diff --git a/docs/config-examples/google.md b/docs/config-examples/google.md index 0d23771b..fff270ed 100644 --- a/docs/config-examples/google.md +++ b/docs/config-examples/google.md @@ -3,10 +3,11 @@ Full support out of the box. ```js +const GOOGLE_OAUTH_APP_GUID = 'YOUR_GOOGLE_OAUTH_APP_GUID' // it looks something like 12345678912-k50abcdefghijkabcdefghijkabcdefv const config = { issuer: 'https://accounts.google.com', - clientId: 'GOOGLE_OAUTH_APP_GUID.apps.googleusercontent.com', - redirectUrl: 'com.googleusercontent.apps.GOOGLE_OAUTH_APP_GUID:/oauth2redirect/google', + clientId: `${GOOGLE_OAUTH_APP_GUID}.apps.googleusercontent.com`, + redirectUrl: `com.googleusercontent.apps.${GOOGLE_OAUTH_APP_GUID}:/oauth2redirect/google`, scopes: ['openid', 'profile'] }; @@ -26,5 +27,16 @@ await revoke(config, { ### Note for Android +To [capture the authorization redirect](https://github.com/openid/AppAuth-android#capturing-the-authorization-redirect), add the following property to the defaultConfig in `android/app/build.gradle`: +``` +android { + defaultConfig { + manifestPlaceholders = [ + appAuthRedirectScheme: 'com.googleusercontent.apps.YOUR_GOOGLE_OAUTH_APP_GUID' + // your url will look like com.googleusercontent.apps.12345678912-k50abcdefghijkabcdefghijkabcdefv + ] + } +} +``` - You need to check custom URI scheme under APIs & Services -> Credentials -> OAuth 2.0 Client IDs -> Your Client Name -> Advanced Settings - It may take 5 minutes to a few hours for settings to take effect.