im using the auth0manager and im trying to use login with email and password but I always keep getting unauthorized , im trying to add the access token to the authentification process but I don’t know how,
how can I add the access token to the header of authentication?
im using this function.
Auth0
.authentication()
.login(
usernameOrEmail: email,
password: password,
realm: connectionDB,
scope: scopes
)
.start { result in
switch result {
case .success(let credentials):
print("Obtained credentials: \(credentials)")
case .failure(let error):
print(error)
failure(authError)
}
im trying to login using mail and password while im activating the client credentials , so im following those steps
1-get acces token with email and password with
url:https://{{auth0_domain}}/oauth/token ,params: grant_type, client_id, audience, username, password, scope
2-after i get an access token i use it to get the user info using:
url:https://{{auth0_domain}}/oauth/token , Headers: Authorization = Bearer “my access token”
but i keep getting unauthorized as a result
Sorry for such delay in response! We’re doing our best in providing the best developer support experience out there, but sometimes the number of incoming questions is just too big for our bandwidth. Sorry for such inconvenience!