GINO App extension to support multiple login providers.
Test SMS Login with Swagger-UI.
- Click "Authorize" in Swagger-UI.
- In the popup, check
openid
scope. - Click "Authorize", a link is shown in a new tab, don't follow the link.
- In the new tab, append
&prompt=json
to the URL in the address bar, hit ENTER and you'll get a JSON. - Copy the value of the
context
into clipboard, this is a JWT token as the login context. - In the same new tab, browse to Swagger-UI again.
- Try out
POST /login/sms
, use the copied value astoken
, use+86
for prefix, and any mobile number. - Hit "Execute", find the SMS ID in the result.
- Try out
PUT /login/sms/{sms_id}
, use the previous SMS ID, the same token andcode
found in the server-side debug log. - Hit "Execute", it says "Method Not Allowed", that's okay.
- Find the actual redirect URL in the server-side log, paste it into the address bar of the same new tab, leave the host name and port as it is.
- Hit ENTER and the new tab will be closed, with the original Swagger-UI logged in.