Skip to content

Commit d781fb6

Browse files
aaguiarzJeff Smith
authored andcommitted
- Changes for new Lock passwordless
- Set oidcConformant in Lock samples
1 parent 4fef789 commit d781fb6

File tree

41 files changed

+303
-155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+303
-155
lines changed

articles/_includes/_lock-sdk.html

Lines changed: 47 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<pre class="hljs html"><code>&lt;script src=&quot;${lock_url}&quot;&gt;&lt;/script&gt;
2424
&lt;script&gt;
2525
var lock = new Auth0Lock('${account.clientId}', '${account.namespace}', {
26+
oidcConformant: true, // Forces an OIDC comformant flow
2627
auth: {
2728
redirectUrl: '${account.callback}',
2829
responseType: 'code',
@@ -42,58 +43,77 @@
4243
&lt;script&gt;
4344
var lock = new Auth0Lock('${account.clientId}', '${account.namespace}', {
4445
container: 'root',
46+
oidcConformant: true, // Forces an OIDC comformant flow
4547
auth: {
46-
redirectUrl: '${account.callback}',
48+
redirectUrl: '${account.callback}', // If not specified, defaults to the current page
4749
responseType: 'code',
4850
params: {
49-
scope: 'openid email' // Learn about scopes: https://auth0.com/docs/scopes
51+
scope: 'openid email' // Learn about scopes: https://auth0.com/docs/scopes
5052
}
5153
}
5254
});
5355
lock.show();
5456
&lt;/script&gt;</code></pre>
5557
</div>
5658
<div id="passwordless-sms" class="tab-pane">
57-
<pre class="hljs html"><code>&lt;script src=&quot;https://cdn.auth0.com/js/lock-passwordless-2.2.min.js&quot;&gt;&lt;/script&gt;
59+
<pre class="hljs html"><code>&lt;script src=&quot;${lock_url}&quot;&gt;&lt;/script&gt;
5860
&lt;script&gt;
59-
var lock = new Auth0LockPasswordless('${account.clientId}', '${account.namespace}');
60-
function open() {
61-
lock.sms({
62-
callbackURL: '${account.callback}',
63-
authParams: {
64-
scope: 'openid email' // Learn about scopes: https://auth0.com/docs/scopes
61+
var lock = new Auth0LockPasswordless('${account.clientId}', '${account.namespace}', {
62+
oidcConformant: true, // Forces an OIDC comformant flow
63+
allowedConnections: ['sms'], // Should match the SMS connection name
64+
auth: {
65+
redirectUrl: '${account.callback}', // If not specified, defaults to the current page
66+
params: {
67+
scope: 'openid email' // Learn about scopes: https://auth0.com/docs/scopes
68+
}
69+
}
6570
}
66-
});
67-
}
71+
);
72+
73+
function open() {
74+
lock.show();
75+
};
76+
6877
&lt;/script&gt;
6978
&lt;button onclick=&quot;window.open();&quot;&gt;SMS&lt;/button&gt;</code></pre>
7079
</div>
7180
<div id="passwordless-magiclink" class="tab-pane">
72-
<pre class="hljs html"><code>&lt;script src=&quot;https://cdn.auth0.com/js/lock-passwordless-2.2.min.js&quot;&gt;&lt;/script&gt;
81+
<pre class="hljs html"><code>&lt;script src=&quot;${lock_url}&quot;&gt;&lt;/script&gt;
7382
&lt;script&gt;
74-
var lock = new Auth0LockPasswordless('${account.clientId}', '${account.namespace}');
83+
var lock = new Auth0LockPasswordless('${account.clientId}', '${account.namespace}', {
84+
oidcConformant: true, // Forces an OIDC comformant flow
85+
passwordlessMethod: "link", // Sets Lock to use magic link
86+
auth: {
87+
redirectUrl: '${account.callback}', // If not specified, defaults to the current page
88+
params: {
89+
scope: 'openid email' // Learn about scopes: https://auth0.com/docs/scopes
90+
}
91+
}
92+
});
93+
7594
function open() {
76-
lock.magiclink({
77-
callbackURL: '${account.callback}',
78-
authParams: {
79-
scope: 'openid email' // Learn about scopes: https://auth0.com/docs/scopes
80-
}
81-
});
82-
}
95+
lock.show();
96+
}
8397
&lt;/script&gt;
8498
&lt;button onclick=&quot;window.open();&quot;&gt;Magic Link&lt;/button&gt;</code></pre>
8599
</div>
86100
<div id="passwordless-emailcode" class="tab-pane">
87101
<pre class="hljs html"><code>&lt;script src=&quot;https://cdn.auth0.com/js/lock-passwordless-2.2.min.js&quot;&gt;&lt;/script&gt;
88102
&lt;script&gt;
89-
var lock = new Auth0LockPasswordless('${account.clientId}', '${account.namespace}');
103+
var lock = new Auth0LockPasswordless('${account.clientId}', '${account.namespace}', {
104+
oidcConformant: true, // Forces an OIDC comformant flow
105+
allowedConnections: ['email'], // Should match the Email connection name, it defaults to 'email'
106+
passwordlessMethod: 'code', // If not specified, defaults to 'code'
107+
auth: {
108+
redirectUrl: '${account.callback}', // If not specified, defaults to the current page
109+
params: {
110+
scope: 'openid email' // Learn about scopes: https://auth0.com/docs/scopes
111+
}
112+
}
113+
});
114+
90115
function open() {
91-
lock.emailcode({
92-
callbackURL: '${account.callback}',
93-
authParams: {
94-
scope: 'openid email' // Learn about scopes: https://auth0.com/docs/scopes
95-
}
96-
});
116+
lock.show();
97117
}
98118
&lt;/script&gt;
99119
&lt;button onclick=&quot;window.open();&quot;&gt;Email Code&lt;/button&gt;</code></pre>

articles/api-auth/dynamic-client-registration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ Sample script:
122122
}
123123
124124
var lock = new Auth0Lock(config.clientID, config.auth0Domain, {
125+
oidcConformant: true,
125126
auth: {
126127
redirectUrl: config.callbackURL,
127128
responseType: config.callbackOnLocationHash ? 'token' : 'code',

articles/api-auth/intro.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ At the moment there is no OIDC-compliant mechanism to obtain third-party API tok
179179

180180
### Passwordless
181181

182-
Our new implementation does not support passwordless authentication. We are currently evaluating this feature and our approach. We plan on supporting this in future releases.
182+
Our new implementation only supports an [OIDC-conformant](/api-auth/tutorials/adoption) passwordless authentication mechanism using the Auth0-hosted login page.
183+
184+
We plan on implementing OIDC-conformant passwordless authentication mechanism for embedded login scenarios in future releases.
183185

184186
### Other Authentication API endpoints
185187

articles/api-auth/passwordless.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ Without passwords, your application will not need to implement a password-reset
1616

1717
## OIDC Conformant Passwordless
1818

19-
Auth0 currently supports [OIDC-conformant](/api-auth/tutorials/adoption) passwordless authentication using centralized login (with the Auth0 [hosted login page](/hosted-pages/login)).
19+
Auth0 currently only supports an [OIDC-conformant](/api-auth/tutorials/adoption) passwordless authentication mechanism using the Auth0-hosted login page.
2020

21-
Customers can use the Lock (Passwordless) template in the [Dashboard](${manage_url}) under **Hosted Pages > Default Templates**, or customize it to fit specific requirements.
21+
We plan on implementing OIDC-conformant passwordless authentication mechanism for embedded login scenarios in future releases.

articles/api-auth/tutorials/adoption/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
- [Client Credentials exchange](/api-auth/tutorials/adoption/client-credentials) (only available in new pipeline)
1111
* [Refresh tokens](/api-auth/tutorials/adoption/refresh-tokens)
1212
* [Delegation (deprecated)](/api-auth/tutorials/adoption/delegation)
13-
* [Passwordless authentication](/api-auth/passwordless)
13+
* [Passwordless authentication for Embedded Login (unsupported)](/api-auth/passwordless)
1414
* [List of breaking changes for OIDC-conformant clients](/api-auth/tutorials/adoption/oidc-conformant)

articles/api-auth/tutorials/adoption/oidc-conformant.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Enabling this flag on a client will have the following effects:
2626
* [Refresh tokens must be used at the token endpoint]() instead of /delegation.
2727
* The `device` parameter, originally used to obtain refresh tokens, is now considered invalid.
2828
* The legacy [resource owner endpoint](/api/authentication#database-ad-ldap-active-) is disabled.
29-
- Passwordless authentication is implemented at this endpoint, so it will be disabled as well.
29+
- Passwordless authentication for embedded login is implemented at this endpoint, so it will be disabled as well.
3030
Support for OIDC-conformant passwordless authentication will be added in future releases.
3131
* The [/oauth/access_token endpoint](/api/authentication#post-oauth-access_token), used for social authentication from native mobile applications, is disabled.
3232
An OIDC-conformant alternative will be added in future releases.

articles/api/authentication/_passwordless.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ curl --request POST \
153153
});
154154

155155
// Verify code sent via email
156-
webAuth.passwordlessVerify({
156+
webAuth.passwordlessLogin({
157157
connection: 'email',
158158
email: 'USER_EMAIL',
159159
verificationCode: 'VERIFICATION_CODE_SENT'
@@ -163,7 +163,7 @@ curl --request POST \
163163
);
164164

165165
// Verify code sent within link using email
166-
webAuth.passwordlessVerify({
166+
webAuth.passwordlessLogin({
167167
connection: 'email',
168168
email: 'USER_EMAIL',
169169
verificationCode: 'VERIFICATION_CODE_SENT_WITHIN_LINK'
@@ -173,7 +173,7 @@ curl --request POST \
173173
);
174174

175175
// Verify code sent via SMS
176-
webAuth.passwordlessVerify({
176+
webAuth.passwordlessLogin({
177177
connection: 'sms',
178178
phoneNumber: 'USER_PHONE_NUMBER',
179179
verificationCode: 'VERIFICATION_CODE_SENT'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Auth0 Lock Passwordless is a professional-looking dialog that allows users to log in after receiving a one-time password via email or text message.
22

3-
After installing [Lock Passwordless](https://github.com/auth0/lock-passwordless), you must initialize it with your `Client Id` and `domain`. You can find this information on your [application settings](${manage_url}/#/applications/${account.clientId}/settings) page.
3+
After installing [Lock](https://github.com/auth0/lock), you must initialize it with your `Client Id` and `domain`. You can find this information on your [application settings](${manage_url}/#/applications/${account.clientId}/settings) page.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Passwordless connections in Auth0 allow users to login without the need to remember a password.
22

3-
This improves the user experience, especially on mobile applications, since users will only need an <% if (withFingerprint) { %> email address, phone number or fingerprint <% } else { %> email address or phone number <% } %> to register for your application.
3+
This improves the user experience, especially on mobile applications, since users will only need an email address or phone number to register for your application.
44

55
Without passwords, your application will not need to implement a password-reset procedure and users avoid the insecure practice of using the same password for many purposes.
66

77
In addition, the credential used for authentication is automatically validated since the user just entered it at sign-up.
88

99
## Configuration
1010

11-
These connections use an authentication channel like <% if (withFingerprint) { %> SMS, e-mail or Touch ID <% } else { %> SMS or e-mail <% } %>. Each of these channels can be configured in the dashboard under [Connections > Passwordless](${manage_url}/#/connections/passwordless).
11+
These connections use an authentication channel like SMS or e-mail. Each of these channels can be configured in the dashboard under [Connections > Passwordless](${manage_url}/#/connections/passwordless).
1212

1313
![](/media/articles/connections/passwordless/passwordless-connections.png)

articles/connections/passwordless/_using-lock-ios-email.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,4 @@ After the passwordless login process begins, ask the user for the one-time code.
4444

4545
<%= include('./_introduction-email-magic-link') %>
4646

47-
The next version of the iOS library will support magic links through iOS 9 Universal Links. When a user clicks a magic link they have received on their device, the link will automatically open your application (instead of opening in the browser) and sign in the user.
48-
4947
Lastly, once the user is authenticated, your app will be able to access the user profile and tokens returned by Auth0.

0 commit comments

Comments
 (0)