React-Native expo how to generate a redirect url with Authsession.startAsync({ authUrl})

Asked

Viewed 30 times

-1

import * as AuthSession from 'expo-auth-session';

const response = AuthSession.startAsync({
        authUrl: `${api.defaults.baseURL}/oauth2/authorize?client_id=${CLIENT_ID}&redirect_uri=${REDIRECT_URI}&response_type=${RESPONSE_TYPE}&scope=${SCOPE}`,
      });

      console.log(response);


log response

Promise {
  "_U": 0,
  "_V": 0,
  "_W": null,
  "_X": null,
}

when I look at the log, it does not come to REDIRECT_URI dirty to use, so it always falls into error 404, as I create a url to redirect?

1 answer

0

You need to run the App in Tunnel mode! Then take a look at your terminal...

inserir a descrição da imagem aqui

If this does not work you will need to drop the Expo CLI by running the following command:

  • expo logout

Browser other questions tagged

You are not signed in. Login or sign up in order to post.