-
-
Notifications
You must be signed in to change notification settings - Fork 697
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
Add Google one-tap authentication example #3244
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow the demo doesn't work for me:
"Can't continue with google.com. Something went wrong."
Apart from that, I think we should add dotenv to a requirements file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I'm still getting the same error.
Strangely, NiceGUI connects to "us-west.on-air.io"... But the authentication should work nonetheless I guess.
And the corresponding startup test is failing for some reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I think I understand why the login didn't work for me: If you only add "localhost" as authorized JavaScript origin, the login will fail when accessing the app at 127.0.0.1. Maybe we should mention this pitfall.
Apart from that, I'd like to remove the dotenv dependency. Since we only use the GOOGLE_CLIENT_ID
constant, we can as well add them to main.py (like here).
This pull request is inspired by #3243 and shows how we can use Google one-tap authentication with NiceGUI.