Thanks for the swift reply, @konrad.sopala!
What I’m trying to achieve is to let users authenticate and login via Python (not a web app, so no flask), something similar to what the .webAuth method provides for a mobile app.
I’ve been trying to use the login method from GetToken (https://github.com/auth0/auth0-python/blob/d18417c8e9284f84d5353157a1eaa360e6634a69/auth0/v3/authentication/get_token.py#L123).
I’ve also tried the client_credentials method from GetToken:
request = GetToken(domain)
response = request.client_credentials(clientId, clientSecret, ‘https://mydomain.com/api/v2/’.format(domain))
token = response[‘access_token’]
from auth0.v3.management import Auth0
auth0 = Auth0(domain, token)
I have not managed to achieve anything with the login method as my only connection is a SAML connection and users have to authenticate with username/password towards the Identity Provider.
The client_credentials method provides me with the attributes that I want, but this method needs to know the user_id. I can’t get hold of the user_id unless the user already is authenticated through the Identity Provider.
I’ve looked at these quickstart as well, but these are meant for web apps bulit on Flask: https://auth0.com/docs/quickstart/backend/python/01-authorization