Closed ishan-flek-ai closed 1 year ago
Everyone is having the google redirect issue,
namespace "com.ember"
defaultConfig {
applicationId "com.ember"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
manifestPlaceholders = [
appAuthRedirectScheme: 'com.googleusercontent.apps.[id]',
]
}
appAuthRedirectScheme has to be google URL to be secure that is the issue everyone is facing. that is because they are using invalid appAuthRedirectScheme, it is not com.[packageName] but what google has given
@ishan-flek-ai should the appAuthRedirectScheme
literally be "com.googleusercontent.apps.[id]", or should [id]
be some arbitrary string?
@rcidt that is your oauth client id that you created on google cloud console
Documentation Feedback
Guide for 0.72 React Native - Sample google auth
Adding google auth
https://github.com/FormidableLabs/react-native-app-auth
Create project on console
https://console.cloud.google.com/
can do this without setting up GCPCreate oauth consent screen
No need to add anything apart from the name and email
Go to credentials and then create credentials, select OAuth client ID,
Application type is Android -> works on both android and ios package name is com.[name]
Create a keystore folder in both ios and android folder and generate keystore
https://medium.com/@hasangi/making-a-signed-apk-for-your-react-native-application-98e8529678db
Follow instruction to generate SHA1 fingerprint
It will generate
[key].apps.googleusercontent.com
https://github.com/FormidableLabs/react-native-app-auth/blob/main/docs/config-examples/google.md
https://github.com/FormidableLabs/react-native-app-auth https://github.com/FormidableLabs/react-native-app-auth/issues/801
AppDelegate.h
https://github.com/FormidableLabs/react-native-app-auth/issues/453 What to do if provider requires redirectUrl to be https?
AppDelegate.mm