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