@@ -906,6 +906,7 @@ This specification defines the following auth types:
906906- ` m.login.msisdn `
907907- ` m.login.dummy `
908908- ` m.login.registration_token `
909+ - {{% added-in v="1.17" %}} ` m.oauth `
909910
910911###### Password-based
911912
@@ -1244,6 +1245,40 @@ user during registration, if applicable.
12441245
12451246{{% definition path="api/client-server/definitions/m.login.terms_params" %}}
12461247
1248+ ###### OAuth authentication
1249+
1250+ {{% added-in v="1.17" %}}
1251+
1252+ | Type | Description |
1253+ | -------------------------------| -------------------------------------------------------------------|
1254+ | ` m.oauth ` | Authentication is supported by authorising via the homeserver's OAuth account management web UI. |
1255+
1256+ {{% boxes/note %}}
1257+ The ` m.oauth ` authentication type is currently only valid on the
1258+ [ ` /keys/device_signing/upload ` ] ( /client-server-api/#post_matrixclientv3keysdevice_signingupload ) endpoint.
1259+ {{% /boxes/note %}}
1260+
1261+ This authentication type provides homeservers the ability to guard access to
1262+ sensitive actions when the client has authenticated via the
1263+ [ OAuth 2.0 API] ( /client-server-api/#oauth-20-api ) , which is otherwise not
1264+ compatible with User-Interactive Authentication (UIA). To do so, the server
1265+ returns a 401 response on the respective request, where the response body
1266+ includes ` m.oauth ` in the ` flows ` list, and the ` m.oauth ` property in the
1267+ ` params ` object has the structure [ shown below] ( #definition-moauth-params ) .
1268+
1269+ The client is expected to open the contained URL to let the user confirm the
1270+ action in the homeserver's account management web UI. Once the user has done
1271+ so, the client submits an ` auth ` dict with just the ` session ` , as follows,
1272+ to complete the stage:
1273+
1274+ ``` json
1275+ {
1276+ "session" : " <session ID>"
1277+ }
1278+ ```
1279+
1280+ {{% definition path="api/client-server/definitions/m.oauth_params" %}}
1281+
12471282##### Fallback
12481283
12491284Clients cannot be expected to be able to know how to process every
@@ -1590,6 +1625,11 @@ because they don't have access to the user's credentials anymore.
15901625The [ User-Interactive Authentication API] ( #user-interactive-authentication-api )
15911626is not compatible with the OAuth 2.0 API, so the endpoints that depend on it for
15921627authentication can't be used when an access token is obtained with this API.
1628+
1629+ The only exception to this is the
1630+ [ ` /keys/device_signing/upload ` ] ( /client-server-api/#post_matrixclientv3keysdevice_signingupload )
1631+ endpoint which uses the [ ` m.oauth ` ] ( /client-server-api/#oauth-authentication )
1632+ authentication type.
15931633{{% /boxes/warning %}}
15941634
15951635** Sample flow**
0 commit comments