react-native-oauth
react-native-oauth copied to clipboard
Redirection from Web view after authentication to the deep link
I have configured a custom auth provider as defined in the docs.The redirect uri specified in the auth server is a deep link to the app. The deep link is working when invoked using Linking.openURL() but it doesn't work when the authentication is successful and the app is supposed to get opened.
Since I'm using this package ,I'm wondering should the redirect uri be the deep link to the app or something else.This information is not properly documented in the README. This is the service I have written that handles auth:
const manager = new OAuthManager('<app_name>')
manager.addProvider({
'provider': {
auth_version: '2.0',
authorize_url:'<auth-url>',
access_token_url: '<auth-url>/token',
callback_url: 'http://localhost/provider',
}
});
manager.configure({
provider: {
client_id: '<id>',
client_secret: '<secret>',
redirect_uri: '<redirect-uri>' //DEEP LINK HERE
}
});
module.exports = {
authManager: () => {
manager.authorize('<provider>')
.then(resp => console.log(resp))
.catch(err => console.log(err));
}
}
Any help is much appreciated
+1 can you show me androidmanifest pls?