Welcome to Descope's Native Flows Kotlin Sample App, a demonstration of how to integrate Descope native flows for user authentication within a Kotlin application. By exploring this project, you can understand how Descope works with Kotlin to manage native flows. For an example with all authentication methods, refer to the Kotlin Sample App.
This sample app includes:
- App Client: An example of how the client communicates with Descope.
Follow these steps to run the sample app and explore Descope's capabilities with Kotlin:
Make sure you have the following installed:
- Android Studio
- Your Project ID which you can get in the Project Settings
-
Clone this repo
-
Open the project within Android Studio
-
Within the
DemoApplication.kt
file of the project, change thedescopeProjectId
(If in a non-US region, or using a custom domain with CNAME, uncommentbaseUrl
and replacemyBaseURL
with your specific localized base URL) -
(Optional) Self-Host Your Flow: Your Descope authentication flow is automatically hosted by Descope at
https://api.descope.com/login/<your_descope_project_id>
but you can use your own website or domain to host your flow. You can modify the value for the flow Url in theLoginActivity.kt
file to include your own hosted page with our Descope Web Component, as well as alter the?flow=sign-up-or-in
parameter to run a different flow.
val descopeFlow = DescopeFlow(Uri.parse("https://api.descope.com/login/$descopeProjectId?flow=sign-up-or-in&shadow=false"))
For more information about Auth Hosting, visit our docs on it here
- Run the simulator within Android Studio - The play button located in the top right
To learn more please see the Descope Documentation and API reference page.
If you need help you can contact us
Descope's Native Flows Kotlin Sample App is licensed for use under the terms and conditions of the MIT license Agreement.