Constantsยง
- ACCESS_
TOKEN_ ๐LENGTH - USER_
CODE_ ๐ALPHABET - Crockford base32 alphabet (excludes I, L, O, U to avoid ambiguity with 1/0).
- USER_
CODE_ ๐GROUP_ LEN - Number of characters in each dash-separated group of a user code.
Functionsยง
- generate_
access_ token - Generate a cryptographically strong opaque token suitable for access/refresh/auth codes.
- generate_
user_ code - Generate a human-typable
user_codefor the OAuth 2.0 Device Authorization Grant (RFC 8628). - token_
digest_ sha256 - Produce a
Digest(HMAC-SHA-256) from an access/refresh token plaintext using a secret key.