diff --git a/app/controllers/api/v1/users_controller.rb b/app/controllers/api/v1/users_controller.rb index 737210dbb..0a419f4a7 100644 --- a/app/controllers/api/v1/users_controller.rb +++ b/app/controllers/api/v1/users_controller.rb @@ -263,7 +263,7 @@ def create_external_id def get_sso_token(application, user) access_token = Doorkeeper::AccessToken.find_or_create_for( application: application, - resource_owner: user.id, + resource_owner: user, scopes: Doorkeeper.config.default_scopes, expires_in: SSO_TOKEN_INITIAL_DURATION, use_refresh_token: false, @@ -276,8 +276,8 @@ def get_sso_token(application, user) ) access_token = Doorkeeper::AccessToken.create_for( - application: application.id, - resource_owner: user.id, + application: application, + resource_owner: user, scopes: Doorkeeper.config.default_scopes, expires_in: SSO_TOKEN_INITIAL_DURATION, use_refresh_token: false