Android Getting started
This quickstart guide walks you through managing authentication with Auth0 in your Android apps.
Each tutorial in the series includes a link to a sample project. You can find all the samples here.
Create a Client
Create a new client application in your Auth0 dashboard. For Type, select Native.
Configure Callback URLs
A callback URL is a URL in your application where Auth0 redirects the user after they have authenticated.
You need to whitelist the callback URL for your app in the Allowed Callback URLs field in your Client Settings. If you do not set any callback URL, your users will see a mismatch error when they log in.
This tutorial series uses a callback URL that looks like this:
YOUR_APP_PACKAGE_NAME with your application's package name, available as the
applicationId attribute in the
Your application needs some details about your client to communicate with Auth0. You can get these details from the Settings section for your client in the Auth0 dashboard.
You need the following information:
- Client ID
We suggest you do not hardcode these values as you may need to change them in the future. Instead, use String Resources, such as
@string/com_auth0_domain, to define the values.
res/values/strings.xml file as follows:
<resources> <string name="com_auth0_client_id">YOUR_CLIENT_ID</string> <string name="com_auth0_domain">YOUR_AUTH0_DOMAIN</string> </resources>