Authentication is often a pain point for users. Nobody wants to create yet another account and remember another password. That's why i decided to implement google oauth for my flask based pdf processing application, revisepdf.
Why google oauth?
- One click authentication
 - No password management for users
 - Higher conversion rates
 - Reduced signup abandonment
 
Setting up with supabase
Supabase made implementing google oauth surprisingly straightforward:
- Created a project in google cloud console and set up oauth credentials
 - Added these credentials to supabase's authentication providers
 - Implemented the authentication flow in flask
 
The implementation
Here's the core code for initiating the google sign 
flow:
python
@auth_bp.route('/google-signin')
def google_signin():
    """google oauth flow."""
    redirect_url=url_for('auth.google_callback',_external=True)
    return redirect(supabase.auth.sign_in_with_oauth({
        "provider": "google",
        "options":{"redirect_to": redirect_url}
    }).url)
              
    
Top comments (2)
revisepdf.com/auth/login
if it doesn't work let me know asap lmao !!