Sign in with OAuth provider
The Sign in with OAuth Provider
method is used to authenticate a user to your site using a widely used third-party application providing OAuth.
To make a request to authenticate a user using OAuth, follow these steps:
- Open the request panel and click on the
+
button to add a new request. - Fill in an appropriate name for the request and select the Supabase app to be used for the request. Then, under the method, choose
Sign in with OAuth
. - Scroll downwards to select the provider and add a redirect URL.
- Add the scopes required for your app.
NOTE
Scopes vary widely based on the provider used, and each provider has a sample of scopes on their respective documentation. An example is Facebook's scopes listed here: https://developers.facebook.com/docs/permissions
How to sign in with OAuth inside the Configurator
The Configurator Canvas is an iframe that proxies the live site. Because of that, some OAuth2 flow are not supported inside the configurator. However, you can still "simulate" signing in with OAuth by following these steps:
- Publish the project and open the live site.
- Sign in with the OAuth provider following the regular flow.
- Open the developer tools and access the local storage.
- Copy the key-value pair that starts with
sb-
and paste it into the configurator's local storage, underhttps://server.wized.com
. - Refresh the configurator canvas, and you should be signed in.
This will allow you to see the logged-in state of the user in the configurator.
Here's a video showing the process: