Hi
I am trying to get an access token for doing authenticated LinkedIn API calls such as ones here :
https://developer.linkedin.com/docs/oauth2
What I am doing is :
Auth0
.webAuth()
.scope("openid profile")
.audience("https://referron.au.auth0.com/userinfo")
.start {
switch $0 {
case .failure(let error):
// Handle the error
print("Error: \(error)")
case .success(let credentials):
// Do something with credentials e.g.: save them.
// Auth0 will automatically dismiss the hosted login page
print("Credentials: \(credentials)")
guard let accessToken = credentials.accessToken, let idToken = credentials.idToken else { return }
print("Access token is \(accessToken)")
print("Id token is \(idToken)")
}
}
But the access token I get is like : “-_KaLvqH6ofKJyywWdp5dwn2RfCNyI9z” which gives an invalid token error when used with LinkedIn API.
Anything i am missing here ?