-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for new passwordless endpoint #556
Add support for new passwordless endpoint #556
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nbandarchi thanks for raising the PR and addressing this issue. Unfortunately oauth/ro
does still exist when a customer has an allow legacy grant type flag enabled on their account. So in order to accept this PR without cutting a major we will need keep the default behavior of the passwordless signIn
function.
We can add a deprecation notice to that function and that it will move to legacySignIn
on the next major. And in order to handle the functionality of the new endpoint, we can add the otp
and realm
parameter and when either is detected switch the other parameters to match the new endpoint.
Allow switching to `otp` grant in signIn
Updated so that it's not defaulting to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nbandarchi thanks for the quick turnaround! Can you please document the otp
and realm
parameters in the jsdoc area for that function? Also we'll need some new tests in passwordless.tests.js
for #signIn
to cover the new otp
usage.
Thanks 🙏
Small bug fix
No problem! Added tests and documentation. The tests are just a duplicated and updated copy of the current tests, but still should show that both paths can coexist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes are great! Thanks for the work here
Changes
Fixing
PasswordlessAuthenticator.signIn()
http://auth0.com/oauth/grant-type/passwordless/otp
connection
torealm
andpassword
tootp
ro
totoken
inOAuthAuthenticator.signIn()
References
Passwordless signin process is attempting to use
oauth/ro
endpoint which no longer exists:Testing
Checklist