You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
Save whether the client supports the device code grant in the database
This commit is contained in:
@@ -625,10 +625,10 @@ async fn device_code_grant(
|
||||
site_config: &SiteConfig,
|
||||
mut repo: BoxRepository,
|
||||
) -> Result<(AccessTokenResponse, BoxRepository), RouteError> {
|
||||
// TODO: Check that the client is allowed to use this grant type
|
||||
//if !client.grant_types.contains(&GrantType::DeviceCode) {
|
||||
// return Err(RouteError::UnauthorizedClient);
|
||||
//}
|
||||
// Check that the client is allowed to use this grant type
|
||||
if !client.grant_types.contains(&GrantType::DeviceCode) {
|
||||
return Err(RouteError::UnauthorizedClient);
|
||||
}
|
||||
|
||||
let grant = repo
|
||||
.oauth2_device_code_grant()
|
||||
|
||||
Reference in New Issue
Block a user