Sonolus Wiki

External Authentication

External authentication allows external services to offer "sign in with Sonolus" features.

Initiation

To initiate external authentication, use a deep link sonolus://external-login/example.com/path/to/endpoint?foo=bar#hash.

If user confirms, a POST request will be sent to the endpoint.

Request Headers

HeaderValueDescription
Sonolus-SignaturestringSee Sonolus-Signature.

Request Body

type AuthenticateExternalRequest = {
    type: 'authenticateExternal'
    url: string
    time: number
    userProfile: UserProfile
}

type

Server should verify that type equals to 'authenticateExternal'.

url

Server should verify that url matches external authentication endpoint.

time

Server should verify that time is recent.

Response Code

CodeDescription
200 OK
401 UnauthorizedAuthentication rejected.

Response Headers

None.

Response Body

None.

Remarks

Server should verify that request body is authentic using Sonolus-Signature request header.