Elixir client for the Apple DeviceCheck API.
DeviceCheck lets your server:
- Validate a device token generated by
DCDevice - Query the two per-device fraud bits stored by Apple
- Update those two bits to reflect device-level state
The public surface is intentionally small:
DeviceCheck.validate_token(device_token)
DeviceCheck.query_bits(device_token)
DeviceCheck.update_bits(device_token, bit0: true, bit1: false)
DeviceCheck.token()Configuration
config :device_check,
team_id: System.get_env("APPLE_TEAM_ID"),
key_id: System.get_env("DEVICE_CHECK_KEY_ID"),
private_key: System.get_env("DEVICE_CHECK_PRIVATE_KEY"),
development: trueEvery function also accepts per-call opts that override the application config.
Summary
Functions
Query the two DeviceCheck bits for a device token.
Query the two DeviceCheck bits for a device token.
Return a cached-per-call DeviceCheck access token after JWT generation.
Update one or both DeviceCheck bits for a device token.
Update one or both DeviceCheck bits for a device token.
Validate a device token with Apple.
Validate a device token with Apple.
Types
Functions
Query the two DeviceCheck bits for a device token.
Query the two DeviceCheck bits for a device token.
Return a cached-per-call DeviceCheck access token after JWT generation.
Update one or both DeviceCheck bits for a device token.
Update one or both DeviceCheck bits for a device token.
Validate a device token with Apple.
Validate a device token with Apple.