Hi @skypearl.infotech,
Thanks for reaching out to the Auth0 Community!
I understand that you are looking for assistance using the Auth0 Authentication API.
First, your domain should be in the format https://YOUR_DOMAIN.REGION.auth0.com
. For example: https://dev-12345.us.auth0.com
To verify, you can find your Domain in your Auth0 Dashboard > Application > Any App settings.
Now, to begin login you must initiate the authorization code flow by calling the /authorize
request to obtain a code:
https://YOUR_DOMAIN/authorize?
response_type=code&
client_id=YOUR_CLIENT_ID&
redirect_uri=https://YOUR_APP/callback&
scope=SCOPE&
state=STATE
Once you obtain the authorization code you can exchange it for an access token:
curl --request POST \
--url 'https://YOUR_DOMAIN/oauth/token' \
--header 'content-type: application/x-www-form-urlencoded' \
--data 'grant_type=authorization_code&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&code=AUTHORIZATION_CODE&redirect_uri=https://YOUR_APP/callback'
And for sign up:
curl --request POST \
--url 'https://YOUR_DOMAIN/dbconnections/signup' \
--header 'content-type: application/json' \
--data '{"client_id":"YOUR_CLIENT_ID", "email":"test.account@signup.com", "password":"PASSWORD", "connection":"CONNECTION", "username": "johndoe", "given_name": "John", "family_name": "Doe", "name": "John Doe", "nickname": "johnny", "picture": "http://example.org/jdoe.png", "user_metadata":{ "plan": "silver", "team_id": "a111" }}'
If you have a moment, please read our Authorization Code Flow doc to learn more.
Please let me know if there’s anything else I can do to help.
Thank you.