Skip to content

AurityLab/kotlin-sign-in-with-apple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1e51180 · Apr 1, 2021

History

22 Commits
Jun 13, 2020
Mar 31, 2021
Apr 1, 2021
Jun 1, 2020
Jun 13, 2020
Jun 13, 2020
Mar 31, 2021
Apr 1, 2021
Jun 1, 2020
Jun 1, 2020
Jun 1, 2020

Repository files navigation

Kotlin Sign in with Apple

GitHub Actions ktlint Maven Central

This library is capable of verifying the identity token from Sign in with Apple.

Install

Gradle

dependencies {
    implementation("com.auritylab:kotlin-sign-in-with-apple:1.0.1") // See above for the latest version!
}

Maven

<dependency>
    <groupId>com.auritylab</groupId>
    <artifactId>kotlin-sign-in-with-apple</artifactId>
    <version>1.0.1</version> <!-- See above for the latest versions! -->
</dependency>

Usage

// Validate the identity token.
val result = AppleSignIn("<your client_id>").validate("<the identity token>")

// If the identity token is expired, etc. the validate() method will return null.
// If there is a network issue or the given identity token is no valid JWT token at all, an exception will be thrown.

println(result.userIdentifier) // The unique identifier of the user.
println(result.email) // The email address of the user.
println(result.emailVerified) // If the email address is verified.
println(result.issuedAt) // The time the token was issued.

About

Identity token verification for Sign In with Apple.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages