Skip to content

authgear/authgear-example-android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Authgear sample for Android

This repo demonstrates how to add authentication to an Android app using Authgear.

Project setup

Create Free Authgear Account

  1. Goto https://portal.authgear.com and create a free account (or login to your existing account).

  2. Then navigate to Applications and create a new client application of type Native App.

Import project to Android Studio

Clone this repo and import to Android Studio, Sync Gradle

Requirements

  • Android Studio (a recent version bundling AGP 9.2+)
  • JDK 17
  • Android SDK Platform 37 (compileSdk 37; the app targets targetSdk 36 / Android 16)

This sample uses Jetpack Compose (Material 3), a MainViewModel with StateFlow, and the Authgear SDK's Kotlin coroutine (suspend) API.

Authgear SDK dependency

The SDK is consumed from Maven Central (no JitPack repository required):

implementation("com.authgear:android-sdk:3.0.0")

Configuration

The project needs to be configured with your Authgear client application's Endpoint and Client ID in order for the authentication flow to work.

To do this, open app/src/main/java/com/example/authgeardemo/Constants.kt, and replace "<AUTHGEAR_CLIENT_ID>", "<AUTHGEAR_ENDPOINT>" with with your own Authgear client application credentials.

To run this example app, add the following URI to your Authgear client application's Authorized Redirect URI:

  • com.example.authgeardemo://host/path

See the full tutorial for this demo app Here.

What is Authgear?

Authgear is a highly adaptable identity-as-a-service (IDaaS) platform for web and mobile applications. Authgear makes user authentication easier and faster to implement by integrating it into various types of applications - from single-page web apps to mobile applications to API services.

Key Features

  • Zero trust authentication architecture with OpenID Connect (OIDC) standard.
  • Easy-to-use interfaces for user registration and login, including email, phone, username as login ID, and password, OTP, magic links, etc for authentication.
  • Support a wide range of identity providers, such as Google, Apple, and Azure Active Directory (AD).
  • Support biometric login on mobile, Passkeys, and Multi-Factor Authentication (MFA) such as SMS/email-based verification and authenticator apps with TOTP.

Documentation

View other Authgear Documentation at https://docs.authgear.com/

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages