OAuth is an open-standard authorization protocol that allows third-party services to exchange your information without exposing your password. In the context of this documentation, OAuth will enable your application to authenticate users via third-party services like Google. This flow typically involves redirecting users to the OAuth provider, where they log in, and then redirecting them back to your application with an authentication token. Incorporating these suggestions could help make the document more accessible, especially to readers who may not be as familiar with OAuth or the specific SDK being used. The JavaScript SDK provides a pre-built UI for OAuth flows, as well as methods to start and authenticate OAuth flows that you can connect to your own UI. Use either of these approaches to quickly get up and running with OAuth.Documentation Index
Fetch the complete documentation index at: https://docs.scute.io/llms.txt
Use this file to discover all available pages before exploring further.
Configuration
To configure OAuth, sign in to control.scute.io, and select your app. From the menu on the left hand side, click on Auth Providers, then select the provider you want to configure and enable it. Enter yourClient ID and Client Secret from your provider and copy the Callback URL and paste it to the appropriate area for your oAuth provider’s configuration.
Using the JS Core SDK to integrate into your own UI
JS Core SDK provides the oAuth configuration and methods to start and oAuth flows that you can connect to your own UI.Getting the oAuth configuration:
YourappData has a property called oauth_providers which is an array of configured oAuth providers that are enabled and configured from control.scute.io.
You can access your app data using the scuteClient.getAppData method:
| Property | Type | Description |
|---|---|---|
| id | provider | string | The provider ID |
| name | string | The provider name |
| icon | string | A URL for the provider icon |
Starting the oAuth flow with signInWithOAuth method:
To start the oAuth flow, you can use the signInWithOAuth method of the scute client. This method takes the provider ID as an argument and will redirect the user to the oAuth provider’s login page: