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: