-
Notifications
You must be signed in to change notification settings - Fork 97
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
Auth0 Lock API v9 is deprecated #9
Comments
I had the same issues with Lock 9, couldn't get it to work. I used Lock version 11.2
And rewrote the
Also, I added |
Seems like the I tried to go with one of them, but it didn't work. You need the The So I sent both tokens to the |
@kay-is Thanks for verifying! I did the same but unfortunately did so by using two headers (Authorization and AccessToken) which meant that a number of other changes (including CORS) were required later in the book as well. It might be possible to concatenate the two tokens and put them both into the Authorization header to keep things simpler, which would then involve a bit of parsing in the Lambda functions. |
Seems like the access token is only used for the Auth0 management API. (https://auth0.com/docs/tokens) Maybe it's not needed later? |
It's needed wherever you want to use the custom authorizer. |
As far as I can tell, the custom authorizer only uses the idToken, not the accessToken. |
Anyone having an issue getting {
"accessToken": "M__x7H6VNlkeq2MPcynmgBPHG6QL6IrB",
"appState": null,
"expiresIn": 7200,
"idToken": null,
"idTokenPayload": null,
"refreshToken": null,
"scope": "openid profile",
"state": "LPxQc-Pazmwh~HpmLT101yL9~EDIE_rE",
"tokenType": "Bearer"
} I'm getting pretty lost in a bunch of Auth0 github issues and Auth0 documentation pages. Curious if either of you (@johnsgp & @kay-is) figured this out. |
Perhaps this is the issue -- that audience is set to an endpoint rather than a custom API? https://auth0.com/docs/tokens/access-token#access-token-format Though it does seem odd given the Auth0 doc warning: |
Here's my solution. You need to specify responseType to be id_token AND token. (This may be what @kay-is wrote in a previous post, but still was a bit confused.) loginButton.click(() =>
{
auth0Lock.show({ auth: {
params: {
responseType: 'id_token token',
scope: 'openid profile'
}
} });
}
); |
Hi @zhammer, yes I specified both |
for some reason id_token didn't seem to be getting passed through from So I had to update my auth0 client options under advanced settings to disable OIDC Conformant that allowed the id_token to finally be returned. After the id_token was coming through I began getting an invalid algorithm error from the user-profile lambda and i had to go back to auth0 client advanced settings and set JsonWebToken Signature Algorithm from RS256 to HS256, finally it's working! |
sorry the explanations and solutions presented here are too convoluted for me could someone post a complete set of the updated code listings please that i am supposed to use in each chapter to get the examples in the book to work now that cdn.auth0.com/js/lock-9.min.js is no longer supported ? thank you |
When I update my auth0 client options advanced settings to disable OIDC Conformant, the id_token finally stored in “Local Storage”. But I try to set "JSON Web Token (JWT) Signature Algorithm" from RS256 to HS256, It's still not working. And then, I go to Api gateway, and add the 'access token' in the Access-Control-Allow-Headers, finally it's working. |
I have been having trouble using Auth0 with a new account created today. A slightly older account created a month or so ago (5 December 2017) works fine.
The error is that Auth0 Lock is trying (and failing) to do an HTTP GET on
In the Auth0 logs of the older account (where it works), I have a warning entry with a deprecation notice:
I followed the descriptions for migration in the documentation combined with the SPA with jQuery Quickstart, and got it to work with centralized login but I cannot be sure this will work with the rest of the chapter and/or book.
In particular, centralized login provides an access token and ID token rather than a user token, and logout does not cleanly eliminate all session data (some cookies remain which 'remember' who last logged in).
It would help to know whether anyone else has a better solution or confirmation that I'm on the right track.
The text was updated successfully, but these errors were encountered: