BP Function: PerformAuthentication

Perform Authentication Node


This action can be used to perform authentication with the SubscribeStar API.

The user's default web browser will be opened a web page to allow them to sign in and give permission to your application to access some of their data.

A local HTTP server will be started to receive the authentication response from SubscribeStar, and finally a request will be made to obtain an access token for the authenticated user.

The returned access token can be used to make additional requests to the SubscribeStar API, e.g. to obtain information about the authenticated user and their subscription to determine if specific content should be unlocked for them.

IMPORTANT NOTE:

Because everything is being handled within the same process, using this action requires that the application have a copy of your client_id and client_secret, both of which will be included in HTTP requests sent to SubscribeStar from the user's computer. This means that the user may be able to extract these values either from the packaged binaries or by analyzing their network traffic during the authentication process.

You should always configure the integration in your SubscribeStar profile to use the minimum number of scopes possible, and in general you should ensure no content_provider_profile.* scopes are enabled or else you might be exposing YOUR information to your users! If you have multiple API clients (e.g. a game using this plugin and a project website which connects to the SubscribeStar API) then you should use separate client_ids for them rather than sharing the same client_id across all clients.


Inputs

  • Client ID

    string

    Your SubscribeStar App client_id.

  • Client Secrent

    string

    Your SubscribeStar app client_secret.

  • Scopes

    string

    List of scopes to request access to, separated by +. Should be a subset of the scopes you have configured your app for.

  • Callback Route

    string

    [optional] The URL to request the authentication callback at. Must match the redirect URI you set in your SubscribeStar app config.

  • Callback Port

    int

    [optional] The port to listen on for the authentication callback. Must match the redirect URI you set in your SubscribeStar app config.

Outputs

  • Main Execution Pin (at the top)

    Execution will immediately continue from this pin while the authentication process continues in the background. Do not use execution flowing from this pin to check for the results, they aren't ready yet!

  • Async Action

    This is a reference to the action running in the background. You can use this to cancel the async action if you decide you actually don't need the results before it has completed.

  • On Complete

    When the authentication process has been completed successfully, execution will flow from this pin.

    Token Info should be valid and can be used at this point.

  • On Fail

    If the authentication process fails for any reason, execution will flow from this pin. You can use this to display an error to the user, prompt them to try again, etc.

    Token Info will be invalid and should not be used!

  • Token Info

    API Token Info

    The user's API access token. This is required for other functions which interact with the SubscribeStar API.






For any questions, help, suggestions or feature requests, please feel free to contact me at nbpsup@gmail.com