export const oauthLoginApi = {
authorizationBaseUrl: "https://accounts.google.com/o/oauth2/auth",
accessTokenEndpoint: "https://www.googleapis.com/oauth2/v4/token",
scope: "openid profile email",
setPrompt: "login",
web: {
appId: process.env.REACT_APP_WEB_API_KEY,
responseType: "code id_token token", // implicit flow
accessTokenEndpoint: "", // clear the tokenEndpoint as we know that implicit flow gets the accessToken from the authorizationRequest
redirectUrl: "http://localhost:8100",
windowOptions: "height=600,left=0,top=0",
setPrompt: "login",
},
android: {
appId: process.env.REACT_APP_ANDROID_CLIENT_KEY,
responseType: "code", // if you configured a android app in google dev console the value must be "code"
setPrompt: "login",
redirectUrl: "com.abc.xyz:/" // package name from google dev console
}
}
### Current Behavior
<!-- Describe the bug. Be specific. I need to understand you problem. -->
When user is trying to login from honeywell CT60 device with Android 7.1.1 sometimes it redirects to google search page and sometime user able to logged in. If user leaves app idle for some time then he/she needs to logout first for login.
Expected Behavior
User should able to login without redirecting to search page
Sample Code or Sample Application Repo
Reproduction Steps
1.Log in into application
2.Entered Mail Id
3.Enter password
4.After clicking on next button it redirects to search engine sometimes
Capacitor version:
"@capacitor/cli": "2.0.0",
Run
npx cap doctor
:Library version:
OAuth Provider:
Your Plugin Configuration
export const oauthLoginApi = { authorizationBaseUrl: "https://accounts.google.com/o/oauth2/auth", accessTokenEndpoint: "https://www.googleapis.com/oauth2/v4/token", scope: "openid profile email", setPrompt: "login", web: { appId: process.env.REACT_APP_WEB_API_KEY, responseType: "code id_token token", // implicit flow accessTokenEndpoint: "", // clear the tokenEndpoint as we know that implicit flow gets the accessToken from the authorizationRequest redirectUrl: "http://localhost:8100", windowOptions: "height=600,left=0,top=0", setPrompt: "login", }, android: { appId: process.env.REACT_APP_ANDROID_CLIENT_KEY, responseType: "code", // if you configured a android app in google dev console the value must be "code" setPrompt: "login", redirectUrl: "com.abc.xyz:/" // package name from google dev console } }
Affected Platform(s):
Android
AndroidManifest.xml
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme">
Expected Behavior
User should able to login without redirecting to search page
Sample Code or Sample Application Repo
Reproduction Steps
1.Log in into application 2.Entered Mail Id 3.Enter password 4.After clicking on next button it redirects to search engine sometimes
Other Information