I have an SPA that is using Azure AD authentication to create ID and Access tokens. My intention is to use Guardian in my Elixir backend to verify that the tokens sent in the Authorization header are legitimate.
Using the VerifyHeader
Guardian Plug I am receiving invalid_token
errors. I assume this is because of a misconfiguration of the secret_key
in the Guardian config. The Access Token decodes correctly on JWT.io
I'm not sure what the secret_key
should be though. No secret is passed to the Azure service when I create the token (ie when the user logs in). I attempted to create a key with a Client Secret configured in the App Registration but that did not work.
Given that the tokens are RS256 encoded, should the Guardian secret_key
be the public key as provided by Azure?