How to use Azure AD auth with certificates instead of client secrets? #7011
Unanswered
sander1095
asked this question in
Help
Replies: 1 comment
-
I would also like to do certificate authentication with the Microsoft Entra provider. Is this something that is slated for a future release? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
nextauth.js documentation about Azure AD mentions using ClientSecrets for authentication. However, Microsoft recommends using a certificate instead. I want to start a discussion about getting this implemented in nextauth.js.
Why it's important
Microsoft's official documentation
Microsoft's recommendation for certificate authentication is mentioned directly on the "Certificates & Secrets" page in an application's page in Azure AD:
Also, if you go to the Integration Assistant, it will show the following where it also recommends you to use certificates:
This "action" links to the following documentation page in case this is helpful.
Community Posts
The community also provides information about why certificates are more secure than client secrets:
Implementing it
I looked through nextauth.js' codebase, but all I can find is support for client secrets.
Azure Key Vault integration
I know this is probably not going to happen, but Microsoft provides a very nice DX for implementing certificate auth with the Azure Key Vault. Perhaps this can be done in a separate package?
Other ways of implementing it
I'm sadly not familair with nextauth.js, so I can't say anything about a good way to implement this. However, I do hope my post makes clear the importance of implementing this, especially for companies that care about good security.
Documenting it
After implementing this, it'd be good to document this feature. I would suggest that nextauth.js would also recommend users to choose certificate authentication instead of client secrets.
Beta Was this translation helpful? Give feedback.
All reactions