Use Aiursoft authentication in your web application
- Create an App
- Redirect the user
- Get the
- Get an
- Transfer the
- Get user info from the user's
Create an App
Sign in Aiursoft Developer Center.
In dashboard, click the Create app button and name your new app.
Copy your App Id and App Secret.
- Check: Enable OAuth in OAuth Settings page.
- Check: View user's basic identity info permission in Permissions page.
Redirect the user
When the user requires login via Aiursoft authentication, redirect the user to the authentication page.
Redirect the user to the OAuth page.
Do NOT call this like an API! This is a web page!
Get the code
After successfully authenticate the user, we will redirect the user back with:
State is the value you passed in the last step.
Code represents the identity of the user.
Get an access token
You need an access token to authenticate your app.
Read here to get your app id and app secret.
Transfer the code to the user's open ID
Code is one time used. Can only be used in 5 minutes. It doesn't represent the user's identity.
Open ID is always the unique ID of that user. It never change.
To get the
Open ID from
Code, call our API here.
Now you can focus on your own logic.
Get user detailed information from open ID (Optional)
When you get the user's open ID, and the user has granted that you can view his profile, call this API to get detailed information:
And you have got user's information and can focus on your own logic.