Company
Date Published
Author
Andrew Smith
Word count
639
Language
English
Hacker News points
None

Summary

This guide explains how to quickly build an OAuth2.0 integration into a simple Flask app using Supabase-py, enabling users to login with their GitHub account. To begin, install the supabase library and create a file for session storage, extending the SyncSupportedStorage class from the gotrue library. Then, initiate the client by creating another file that imports necessary modules and sets up the Supabase client with environment variables for URL and key. The guide focuses on handling the OAuth flow using Proof Key for Code Exchange (PKCE) and creates a sign-in route to trigger the OAuth sign-in request, as well as a callback endpoint to handle the user authentication.