What you’ll learn:
- How OAuth works with Metorial
- Creating Provider Setup Sessions
- Storing and reusing Provider Auth Configs
How OAuth Works
The OAuth flow uses Provider Setup Sessions:- Create a Provider Setup Session for the provider the user needs to authorize
- Redirect the user to the session URL to complete OAuth in their browser
- Wait for completion — returns the completed setup session with an auth config
- Store the Provider Auth Config ID for that user in your database
- Pass the auth config ID when creating sessions for that user