OAuth 2.0
Learn about how to create configurations for OAuth 2.0 providers and how to generate access tokens.
OAuth provides a standardized and secure way for applications (i.e. Google Sheets, Twitter etc.) to give access to resources on behalf of a user without the user having to share their credentials with Midio.
In Midio you can store client credentials and generate access tokens that are stored as Secrets
. If the access tokens have an expiry time, Midio will automatically try to update them.
To enable this, you have to:
Register and retrieve client credentials for the OAuth provider from an application. This is done outside of Midio. For instance, you can follow this guide to set up a OAuth web application in Google..
Use this URL when prompted for a OAuth redirect url:
https://<your-project-name>.oauth.midio.dev/callback
Generate access token and save as Secret
Save client credentials
Prerequisite
Make sure you to have registered and retrieved client credentials from an application. You should have this information:
Client ID
Client secret
Authorization URL
Token URL
Scopes
Save in Midio
Open
Settings
and go to theOAuth 2.0 providers
panelClick
Add provider
Add your client configuration in the popup
If you have multiple scopes, you can paste them in directly if it is a list that is newline separated.
Generate access token
Prerequisite
Make sure you have saved a client configuration in Midio for the application you are integrating with.
Generate and save as Secret
Open
Settings
and go to theSecrets
panel.Click
Add OAuth 2.0 provider secret
Select a configured provider from the list
Enter a name for the Secret. This secret is where the access token will be saved to.
Choose the environments where the Secret will be active in. By default it is stored in both Development and Production.
Click
Continue
to be redirected to login with the OAuth 2.0 provider
If the authorization flow is successful you will have a new secret in the table!
Last updated
Was this helpful?