Skip to content

Instantly share code, notes, and snippets.

@noinarisak
Last active June 7, 2021 17:08
Show Gist options
  • Save noinarisak/b7976b22b518dce4a46d274c2fbe8ba6 to your computer and use it in GitHub Desktop.
Save noinarisak/b7976b22b518dce4a46d274c2fbe8ba6 to your computer and use it in GitHub Desktop.
Okta Sign In Widget Passwordless configuration
<script type="text/javascript">
new OktaSignIn({
baseUrl: "{{config.okta_org_name}}",
logo: "{{config.settings.app_logo}}",
clientId: "{{config.client_id}}",
redirectUri: "{{config.redirect_uri}}",
i18n: {
en: {
'primaryauth.title': 'Sign in to {{config.settings.app_name|safe}}'
}
},
features: {
registration: true, // Enable self-service registration flow
rememberMe: true, // Setting to false will remove the checkbox to save username
multiOptionalFactorEnroll: true, // Allow users to enroll in multiple optional factors before finishing the authentication flow.
selfServiceUnlock: true, // Will enable unlock in addition to forgotten password
smsRecovery: true, // Enable SMS-based account recovery
callRecovery: true, // Enable voice call-based account recovery
webauthn: true, // Enable passwordless
passwordlessAuth: true // Not documented
},
authParams: {
issuer: "{{config.issuer}}",
responseType: 'code',
responseMode: 'form_post',
state: '{{state}}',
display: 'page',
pkce: false,
scopes: ['openid', 'profile', 'email']
},
}).renderEl(
{ el: '#sign-in-widget' },
function (res) {}
);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment