Closed vidaritos closed 5 years ago
Should the following if-statement here also include to check responseType === 'token id_token'?
It did, before you removed the %20 :D
provider.responseType === 'token%20id_token'
Any way, it looks like you caught a bug (or at least some icky code) there. Would you mind sending in a PR?
I'm having the most difficult time getting the authorization flow working with Auth0.
I tried first the examples provided by the Auth0 site to integrate the authentication with my SPA, which works fine, but when I use aurelia-authentication plugin using the same config, it fails. The flow stops at the
/authorize
endpoint If I set theresponseType = 'token'
, I get the following error in the console:Unhandled rejection TypeError: Cannot read property 'token' of null
Other attempts:responseType = 'token id_token'
gives me this error:Unhandled rejection Error: Only 'token' responseType is supported
responseType = 'token%20id_token'
results in/authroize
to return HTTP 501If I change the line https://github.com/SpoonX/aurelia-authentication/blob/9ae76ac2a5fb6111c5ee5427587e746112911dc5/src/authLock.js#L63-L64 to
opts.auth.responseType = provider.responseType.replace('%20', ' ');
It seems to work./authorize
then returns HTTP 200Should the following if-statement here also include to check responseType === 'token id_token'?
https://github.com/SpoonX/aurelia-authentication/blob/9ae76ac2a5fb6111c5ee5427587e746112911dc5/src/authLock.js#L93-L96 Or am I missing something here?
I found this https://github.com/auth0/lock/issues/809, indicating responseType = 'token id_token' is now mandatory?
AuthConfig: