Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect after logging in with google does not send focus back to app and login. #701

Open
4 tasks done
ravetroll opened this issue Oct 17, 2024 · 2 comments
Open
4 tasks done

Comments

@ravetroll
Copy link

Checklist

  • I have looked into the Readme (React/Angular/Vue) and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

I cloned the latest repo with package file like below:

"@angular/common": "^16.2.12", "@angular/core": "^16.2.12", "@angular/forms": "^16.2.12", "@angular/platform-browser": "^16.2.12", "@angular/platform-browser-dynamic": "^16.2.12", "@angular/router": "^16.2.12", "@auth0/auth0-angular": "^2.2.0", "@capacitor/android": "^5.6.0", "@capacitor/app": "^5.0.0", "@capacitor/browser": "^5.0.0", "@capacitor/core": "^5.0.0", "@capacitor/haptics": "^5.0.0", "@capacitor/ios": "^5.6.0", "@capacitor/keyboard": "^5.0.0", "@capacitor/status-bar": "^5.0.0", "@ionic/angular": "^6.7.0", "rxjs": "^7.8.0", "tslib": "^2.6.0", "zone.js": "~0.13.1"

and created my auth.config.ts file to match the settings for my native app config in Auth0. I compiled and ran the app in normal angular web browser using ng serve and it worked correctly off http://localhost:4200. The auth flow was fine using login with Google.

I then ran

npx cap add android

ng build -c production

npx cap copy

npx cap open android

That opens my Android Studio Ladybug 2024.2.1. It requests an upgrade to Grade 8.7 which I allow.

I then run it, it build and compiles and shows the app in the emulator with the button to login in the middle.

I click the button and get redirected to the auth0 login page

I choose to login with google, enter my username and password and then do the phone auth confirmation, but in this case the screen just hangs on the google screen where I have done the phone confirmation and doesn't redirect to the app.

I am working on my actual app that runs angular 18 with the latest capacitor and its doing exactly the same thing.

Reproduction

cloned the latest repo with package file like below:

"@angular/common": "^16.2.12", "@angular/core": "^16.2.12", "@angular/forms": "^16.2.12", "@angular/platform-browser": "^16.2.12", "@angular/platform-browser-dynamic": "^16.2.12", "@angular/router": "^16.2.12", "@auth0/auth0-angular": "^2.2.0", "@capacitor/android": "^5.6.0", "@capacitor/app": "^5.0.0", "@capacitor/browser": "^5.0.0", "@capacitor/core": "^5.0.0", "@capacitor/haptics": "^5.0.0", "@capacitor/ios": "^5.6.0", "@capacitor/keyboard": "^5.0.0", "@capacitor/status-bar": "^5.0.0", "@ionic/angular": "^6.7.0", "rxjs": "^7.8.0", "tslib": "^2.6.0", "zone.js": "~0.13.1"

create auth.config.ts file to match the settings for native app config in Auth0.

npx cap add android

ng build -c production

npx cap copy

npx cap open android
opens Android Studio Ladybug 2024.2.1. It requests an upgrade to Grade 8.7

build and compiles and shows the app in the emulator with the button to login in the middle

I click the button and get redirected to the auth0 login page

choose to login with google, enter username and password and then do the phone auth confirmation

screen just hangs on the google screen where the phone confirmation info shows and doesn't redirect to the app.

Additional context

In the Auth0 logs it says authentication happened successfully.

Sample

Angular

Platform

Android

Platform version(s)

auth0-angular version 2.20 Angular version 16.2.12

@artur-oliva
Copy link

Have you found a solution for this? I am having exactly the same problem.

@ravetroll
Copy link
Author

No I am hoping someone will help. I m pretty sure I did the config right in Auth0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants