Iam trying to implement socail signin (with google) in react native expo using amplify (and aws cognito). Iam invoking signInWithRedirect() function As mentioned in the amplify auth doc But iam getting an error instead of opening the in app browser.
Error message: OAuthSignInException: Error: The @aws-amplify/rtn-web-browser package doesn't seem to be linked. Make sure:
You rebuilt the app after installing the package
You are not using Expo Go
also showing below messages in terminal:
OAuthSignInException: Error: The @aws-amplify/rtn-web-browser package doesn't seem to be linked. Make sure:
You rebuilt the app after installing the package
You are not using Expo Go
I tried rebuilding and using developement build instead of Expo go .But it is not solved
--------------- Signin function ----------
const handleGoogleLogin = async () => {
try {
await signInWithRedirect()
}catch(err)
{ console.log(err)
}
-------------- config in app.js -------------------------
import { Amplify } from 'aws-amplify';
Amplify.configure({
Auth: {
Cognito: {
// Amazon Cognito User Pool ID
userPoolId:'us-east-2_******',
// OPTIONAL - Amazon Cognito Web Client ID (26-char alphanumeric string)
userPoolClientId:'4rios************',
// REQUIRED only for Federated Authentication - Amazon Cognito Identity Pool ID
// identityPoolId:'us-east-2:**************************',
// OPTIONAL - This is used when autoSignIn is enabled for Auth.signUp
// 'code' is used for Auth.confirmSignUp, 'link' is used for email link verification
signUpVerificationMethod: 'code', // 'code' | 'link'
loginWith: {
// OPTIONAL - Hosted UI configuration
oauth: {
domain:'https://f*******.auth.us-east-2.amazoncognito.com',
scopes: [
'email'
],
redirectSignIn: ['f*****://'],
redirectSignOut: ['f****://'],
responseType: 'token', // or 'token',
providers: {
Google: {
clientId: '*************-*****************.apps.googleusercontent.com',
responseType: 'code' // Optional, defaults to 'code'
},
}
}
}
}
}
});
I tried rebuilding and using developement build instead of Expo go .But it is not solved.