BP Function: PerformAuthentication (UMG Browser)
C++ Impl | UNBSSAuthenticationAction |
---|
Performs OAuth login to SubscribeStar and requests the user's consent to share data with your application using a UMG WebBrowser widget, so they can complete the entire process without leaving the game.
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 in-game content should be unlocked for them.
Inputs
-
Browser Widget
Web Browser
UMG WebBrowser widget you want the login page to be shown in.
-
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
Integer
[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