2 releases
0.1.1 | Jan 19, 2024 |
---|---|
0.1.0 | Jan 19, 2024 |
#3 in #sign-in
31 downloads per month
15KB
196 lines
Apple Sign In for Rust
This crate provides an API to verify and decode Apple's identity JWT, typically generated via the AuthenticationServices
iOS Framework.
Usage
Add apple-signin
to your project.
cargo add apple-signin
or
[dependencies]
apple-signin = "*"
And then, you can verify an identityToken
obtained from ASAuthorizationAppleIDCredential
use apple_signin::AppleJwtClient;
#[tokio::main]
async fn main() -> Result<()> {
let mut client = AppleJwtClient::new(&["com.example.myapp"]);
let payload = client.decode("[IDENTITY TOKEN]").await?;
dbg!(payload);
Ok(())
}
For more detailed instructions, check out the documentation.
License
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.
Dependencies
~4–17MB
~248K SLoC