I'm trying to upgrade out current MSAL 1.4 auth strategy to MSAL 2.0
I can successfully login and get an Access token using msal-browser
, however when I try pass that to our backend as a Bearer Token
I get an Invalid Token
error.
Our current backend uses Hapi.js
and jwks-rsa
to get a list of Keys from https://login.microsoftonline.com/common/discovery/keys and I think this is where the issue lies.
Looking at the AccessToken on jwt.io the x5t
and kid
values do not match the publicly listed values. Which as I understand it means the two keys will not authenticate.
Where am I going wrong?