Allow Custom Nonce Value for Apple Provider #12096
SyedAli00896
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
Non-Goals
Background
The current implementation of next-auth's Apple Provider automatically computes a SHA256 hashed nonce value, which is suitable for some use cases. However, some backend SDKs, such as Firebase, only allow the use of rawNonce for verifying the id_token. This creates friction for developers who need to verify the id_token on the backend using the rawNonce.
Proposal
This feature could be implemented by adding an option in the Apple Provider configuration that allows developers to pass a custom nonce value. This value would override the default behavior of automatically generating and hashing a nonce with SHA256. Instead, the provided custom nonce (e.g., rawNonce) would be sent to the Apple authentication endpoint and subsequently be used in the backend for token verification.
Beta Was this translation helpful? Give feedback.
All reactions