Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.

After authentication not redirecting back to app #12

Open
theranjali-nilaweera opened this issue Oct 11, 2017 · 2 comments
Open

After authentication not redirecting back to app #12

theranjali-nilaweera opened this issue Oct 11, 2017 · 2 comments

Comments

@theranjali-nilaweera
Copy link

Hi,
We are trying to use auth0 and Expo's AuthSession to authenticate users in a browser and then direct them back to the application with the token, etc..
Right now when using

exp start
and testing on iOS and Android through expo app, we see the auth0 lock screen and then it redirects back to our app perfectly.

But after building standalone ipa and apk files from the auth0 lock screen success it redirect

https://expo.io/@myuser/{project-slug}/+expo-auth-session#access_token=[TOKEN]&scope=openid&expires_in=7200&token_type=Bearer&state=[somevalue]
The page shows "404. Looks like the page you are looking for does not exist. Here are some links to bring you back to Expo", and there are 3 options: return home, log in to your account, create an account.

We expect the app to actually close the browser with the access token. Any help would be really great. Thanks

Our project is configured using
"expo": "^21.0.2" "react": "^16.0.0-alpha.12" "react-native": "https://github.com/expo/react-native/archive/sdk-21.0.2.tar.gz",

We are using the following commands to generate apk and ipa.

exp build:android
exp build:ios

@theranjali-nilaweera theranjali-nilaweera changed the title After authenticaion not redirecting back to app After authentication not redirecting back to app Oct 11, 2017
@Motke84
Copy link

Motke84 commented Oct 25, 2017

Hi,
same with my project, getting "cannot GET /+expo-auth-session",
and not redirected back to app,
this happening only in dev environment,
It is working fine if we publishing the project

Our project is using:
"expo": "^22.0.0"
"react": "16.0.0-beta.5",
"react-native": "https://github.com/expo/react-native/archive/sdk-22.0.1.tar.gz",

please help,
Many Thanks.

@justinobney
Copy link

Have you read this: https://docs.expo.io/versions/latest/sdk/auth-session.html#usage-in-standalone-apps

Usage in standalone apps
In order to be able to deep link back into your app, you will need to set a scheme in your project app.json, and then build your standalone app (it can’t be updated with an OTA update). If you do not include a scheme, the authentication flow will complete but it will be unable to pass the information back into your application and the user will have to manually exit the authentication modal.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants