Hi there.
I am a newbie at authentication things, so please bear with me when I claim something dumb.
I’m trying to set up a login via auth0-python==3.19.0
.
I set up a Native application, working together with my Username Password Authentication database.
I’m using the login from my Flutter app, which works fine. I followed the auth0 tutorial (from here: Get Started with Flutter Authentication) there, and it works fine.
Now I’m trying to access the same login from a python GUI that uses the auth0-python library (from here: GitHub - auth0/auth0-python: Auth0 SDK for Python),
but it fails with even the most basic try:
In [0]: from auth0.v3.authentication import Database
In [1]: database = Database("myurl.eu.auth0.com")
In [2]: database.login(client_id="CLIENT_ID", username="mail@mail.com", password="s3cret", connection="Username-Password-Authentication")
---------------------------------------------------------------------------
Auth0Error Traceback (most recent call last)
<ipython-input-40-5a9e319e2bb3> in <module>
----> 1 Database("myurl.eu.auth0.com").login(client_id="CLIENT_ID", username="mail@mail.com", password="s3cret", connection="Username-Password-Authentication")
~/workspace/gui/.venv/lib/python3.9/site-packages/auth0/v3/authentication/database.py in login(self, client_id, username, password, connection, id_token, grant_type, device, scope)
35 if device:
36 body.update({'device': device})
---> 37 return self.post('{}://{}/oauth/ro'.format(self.protocol, self.domain), data=body)
38
39 def signup(self, client_id, email, password, connection, username=None, user_metadata=None,
~/workspace/gui/.venv/lib/python3.9/site-packages/auth0/v3/authentication/base.py in post(self, url, data, headers)
48 request_headers.update(headers or {})
49 response = requests.post(url=url, json=data, headers=request_headers, timeout=self.timeout)
---> 50 return self._process_response(response)
51
52 def get(self, url, params=None, headers=None):
~/workspace/gui/.venv/lib/python3.9/site-packages/auth0/v3/authentication/base.py in _process_response(self, response)
57
58 def _process_response(self, response):
---> 59 return self._parse(response).content()
60
61 def _parse(self, response):
~/workspace/gui/.venv/lib/python3.9/site-packages/auth0/v3/authentication/base.py in content(self)
82 reset_at=reset_at)
83
---> 84 raise Auth0Error(status_code=self._status_code,
85 error_code=self._error_code(),
86 message=self._error_message())
Auth0Error: 404: Not Found
I don’t really know what other info I need to add to this, so please tell me - does anyone already have a clue what I could be missing?
Thanks in advance!