Currently, we provide a Login Sample which demonstrates the use of the Auth Interface to log in with the SDK.
This sample has been developed using Android Studio 4.0.1, built with SDK version 29. The minimum SDK version is 23.
Before You Begin
Make sure you have correctly set the values associated with your application in
gradle.properties and in
res/values/strings.xml. Without these, the SDK will fail to run correctly. The required settings in gradle.properties are:
productId: Your product id
sandboxId: Your sandbox id
deploymentId: Your deployment id
clientId: Your client id
clientSecret: Your client secret
eos_login_protocol_scheme with your clientId. For example:
If you do not have the values for these settings, you can learn more about them in the Developer Portal documentation.
When you first start the app, you will be presented with a screen that contains a Login button. This button will take you through the login flow on the Account Portal.
Each time you open the app, it will attempt to automatically log in with the last credentials you logged in with, using persistent auth. If you have not previously logged in, persistent auth will fail to find any existing credentials.
Logging In With The Account Portal
When you press the Login button, a secure session will start, and the OS will will open the Epic account portal in a web browser. Here you can sign into your Epic account.
When this flow is completed, you will be returned to the app, where the login will be confirmed.
You can terminate the application without logging out, then reopen it to observe the persistent login flow. You can also log out of the application. This will clear the stored credentials.