diff --git a/src/components/AuthMethodButton/AuthMethodButton.stories.tsx b/src/components/AuthMethodButton/AuthMethodButton.stories.tsx index 12b7415..8599f31 100644 --- a/src/components/AuthMethodButton/AuthMethodButton.stories.tsx +++ b/src/components/AuthMethodButton/AuthMethodButton.stories.tsx @@ -22,7 +22,23 @@ export default { control: 'select', defaultValue: 'token', options: ['token', 'code'] - } + }, + action: { + name: 'Action', + control: 'select', + defaultValue: undefined, + options: ['confirm', 'accept', 'approve', 'sign', 'login'] + }, + message: { + name: 'Message (Danish MitID + Swedish BankID)', + control: 'text', + defaultValue: undefined + }, + loginHint: { + name: 'Login hint', + control: 'text', + defaultValue: undefined + }, } } as ComponentMeta; @@ -35,6 +51,9 @@ const Template: ComponentStory = (args, {globals}) => { domain={globals.domain} clientID={globals.clientID} redirectUri={window.location.href} + action={(args as any).action} + message={(args as any).message} + loginHint={(args as any).loginHint} prompt="login" > diff --git a/src/components/AuthMethodSelector/AuthMethodSelector.stories.tsx b/src/components/AuthMethodSelector/AuthMethodSelector.stories.tsx index e1fe346..af2191f 100644 --- a/src/components/AuthMethodSelector/AuthMethodSelector.stories.tsx +++ b/src/components/AuthMethodSelector/AuthMethodSelector.stories.tsx @@ -51,7 +51,7 @@ export default { options: ['confirm', 'accept', 'approve', 'sign', 'login'] }, message: { - name: 'Message (Danish MitID)', + name: 'Message (Danish MitID + Swedish BankID)', control: 'text', defaultValue: undefined }, diff --git a/src/provider.tsx b/src/provider.tsx index 0a0ba7c..281a72f 100644 --- a/src/provider.tsx +++ b/src/provider.tsx @@ -75,7 +75,10 @@ export const ACTION_SUPPORTING_ACR_VALUES = [ export const MESSAGE_SUPPORTING_ACR_VALUES = [ 'urn:grn:authn:dk:mitid:low', 'urn:grn:authn:dk:mitid:substantial', - 'urn:grn:authn:dk:mitid:high' + 'urn:grn:authn:dk:mitid:high', + 'urn:grn:authn:se:bankid:same-device', + 'urn:grn:authn:se:bankid:another-device', + 'urn:grn:authn:se:bankid:another-device:qr' ]; export function buildLoginHint(loginHint: string | undefined | null, params: {options?: AuthorizeUrlParamsOptional, action?: Action, message?: string}) {