I have an API that serves as backend for a frontend
I am trying to finish SSO login but i am having issues retrieving token and using /callback endpoint
After configuring my Application in Dashboard, looks executes a post request for my api_domain/callback
The start point of my SSO login is calling /sso/org_acronym
const azureADConfig = {
authRequired: false,
auth0Logout: true,
secret: 'mysecret',
baseURL: 'http://localhost:3000',
clientID: 'myclientid',
issuerBaseURL: 'myissuerBaseUrl',
}
const applyAuth0Middleware = (config) => {
const middleware = auth(config)
return (req, res, next) => {
middleware(req, res, next)
}
}
router.get('/sso/:org_acronym', applyAuth0Middleware(azureADConfig), (req, res) => {
})
Then I applied a middleware using auth to redirect to localhost:3000/callback, but neither in /sso route or /callback route i receive a req.body or req.headers… it is always an empty object
And in log i receive
@127.0.0.1 POST /callback {"extraDetail":{"ip":"127.0.0.1","method":"POST","url":"/callback","body":{},"statusCode":302,"responseTime":"4.210ms","signalTrackerId":"sdaabcbeac929b723e7"}}
If i go to the sample test in dashboard, it says that my login as successful
How can i fetch token or something that proves that the authorization worked and then i can redirects to my other frontend page?