expo / examples

Example projects that demonstrate how to use Expo APIs and integrate Expo with other popular tools
2.23k stars 867 forks source link

running with-auth0 example always gives: result = null on web #364

Closed getindepender closed 2 years ago

getindepender commented 2 years ago

Describe the bug A clear and concise description of what the bug is. Running the with-auth0 example doesn't retrieve the result. UseEffect is called but result always stays null.

The url on return contains the token but that isn't picked up: "http://localhost:19006/#id_token=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InM2eHBNR0l3YmRTOU...."

To Reproduce Steps to reproduce the behavior:

  1. create new project with 'expo init authtest'
  2. Install the dependencies with expo install, choose empty project
  3. Copy the contents of the App.js of the example to that one of the project
  4. Fill in the client id and url., fill in the callback url in Auth0
  5. run 'npm run web'
  6. Press the login button
  7. Login with user in the Auth0 window
  8. The browser returns to the http://localhost:19006 with the id_token but it isn't picked up.

Expected behavior I expected to get an non-null result

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

fetimo commented 2 years ago

@getindepender I found this issue helped me https://github.com/expo/examples/issues/289#issuecomment-927322312

getindepender commented 2 years ago

@getindepender I found this issue helped me #289 (comment)

Hi @fetimo Thanks for your reply and help.

I tried adding those two lines and it didn't work in my standard browser (Firefox). As a double check i ran the example with Chrome and Edge. In those browsers i get a successful response with the token in it.

Do you maybe have an short git repo example that works for you that i could try?

Cheers

getindepender commented 2 years ago

Found it... Setting in firefox: 'Open link in new tab instead of a window' was the culprit. Turning this of in the browser fixes it...

I'll close this one.