Use OAuth2.0 authorization code mode
1
Splice login authorization link
Splice login authorization link and guide users to click
2
Jump to GenAuth for authentication
Guide users to click the login link and jump to GenAuth for authentication
3
Handle callback
Use the authorization code code to exchange for AccessToken on the back end
4
Complete authentication
The server authenticates the user and executes the subsequent process
Splice login authorization link
You need to splice a login URL for users to click on, so as to jump to the authentication page.
GET
https://<your application domain name>.genauth.ai/oauth/auth
Splice a link and let the end user visit it in the browser to initiate an OAuth2.0 authorization login request.
To initiate authorization, you need to splice a URL for authorization and let the end user visit it in the browser. The specific parameters are as follows:
Request example:
https://<your application domain name>.genauth.ai/oauth/auth?client_id=5c9b079883e333d55a101082&redirect_uri=https://www.example.cn/example&scope=user&response_type=code&state=52378542395
