Authentication
The SDK supports multiple authentication methods to ensure secure and flexible access for users.
OAuth Authentication
The Pango Partner VPN Backend supports OAuth authentication with a partner's OAuth server, which is the main method for authenticating users. Here are the steps to implement OAuth:
Prerequisites
Access to an OAuth service that can be accessed over the Internet.
OAuth credentials (client ID and client secret) for your service.
Set Up OAuth Service
Deploy and configure your OAuth service so it can be accessed over the Internet.
Obtain your OAuth credentials, such as the client ID and client secret.
Configure the Partner Backend
Set up the Pango Partner VPN Backend to use your OAuth service.
Provide the required OAuth details, including:
OAuth server URL
Client ID
Client secret
Implement OAuth in Your Client Application
In your Android app, implement the OAuth flow to authenticate users and obtain access tokens.
Use the appropriate OAuth libraries or SDKs for Android to handle the authentication process.
Retrieve the Access Token
After a successful authentication, retrieve the access token from the OAuth server.
This token will be used to initialize and log in to the Android Partner SDK.
Initialize the Android Partner SDK
Use the obtained access token to log into the Android Partner SDK.
Here's an example of how to initialize the SDK with the access token:
List of Authentication Methods
Pango Authentication
Firebase -
AuthMethod.firebase(token)
: Authenticates using a Firebase token. Should be configured when creating the app. This is a service from Google and you can learn more about it here.OAuth -
AuthMethod.customOauth(token)
: Authenticates using a specific OAuth type. Should be configured when creating the app.Anonymous -
AuthMethod.anonymous()
: This method is no longer supported.
Last updated