I authenticate my user when he clicks the sign in button in my Chrome application. This opens up a new page in Chrome, inviting them to sign in to their Google account. Then a popup window opens asking for the permissions that my application is requesting. When they click ok, the application gets token - everything works fine until I switch to another locale.
When I test the application in Korean, token undefined after a successful login. I researched further, and I found out that I am getting the error chrome.runtime.identity.getAuthToken: Authorization page could not be loaded .
extensions::lastError:133 Unchecked runtime.lastError while running identity.getAuthToken: Authorization page could not be loaded. at chrome-extension://APP_ID/foreground/bundle/app.js:29630:24 at chrome-extension://APP_ID/foreground/bundle/app.js:28068:46 at Object.loadUserPlaylists (chrome-extension://APP_ID/foreground/bundle/app.js:27679:13) at SidebarPlaylists.onSignInAndLoadUserPlaylists (chrome-extension://APP_ID/foreground/bundle/app.js:42014:19) at Object.invokeGuardedCallback (chrome-extension://APP_ID/foreground/bundle/app.js:11872:13) at executeDispatch (chrome-extension://APP_ID/foreground/bundle/app.js:11717:22) at Object.executeDispatchesInOrder (chrome-extension://APP_ID/foreground/bundle/app.js:11737:8)
This prevents the login and use of my Chrome app in Korea. Why is this happening and how can I fix it?
Update:
Adding the following permissions did not help:
"https://*.chromiumapp.org/*", "https://chromiumapp.org/", "https://*.apps.googleusercontent.com/", "https://apps.googleusercontent.com/", "https://apps.googleusercontent.com/", "https://apps.googleusercontent.com/", "https://*.chromiumapp.org/*/*"
Update2:
I tried using launchWebAuthFlow() instead of identity.getAuthToken() .
chrome.identity.launchWebAuthFlow({ url: "https://accounts.google.com/o/oauth2/v2/auth?scope=email&response_type=token&client_id=MY_CLIENT_ID&redirect_uri="+chrome.identity.getRedirectURL()+"&prompt=consent", interactive: true }, function(respUrl) {
It also gives me
extensions::lastError:133 Unchecked runtime.lastError while running identity.launchWebAuthFlow: Authorization page could not be loaded.
Mistake.
google-chrome google-chrome-app
Maximus s
source share