From 5c5c92be4c50e005005c3b7459ea8f1f94c58724 Mon Sep 17 00:00:00 2001 From: Dante Soares Date: Mon, 21 Oct 2024 13:44:03 -0500 Subject: [PATCH] Fix user API scopes again --- app/controllers/api/v1/users_controller.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/v1/users_controller.rb b/app/controllers/api/v1/users_controller.rb index 7c0244783..737210dbb 100644 --- a/app/controllers/api/v1/users_controller.rb +++ b/app/controllers/api/v1/users_controller.rb @@ -261,12 +261,10 @@ def create_external_id private def get_sso_token(application, user) - default_scopes = Doorkeeper.config.default_scopes.to_s - access_token = Doorkeeper::AccessToken.find_or_create_for( application: application, resource_owner: user.id, - scopes: default_scopes, + scopes: Doorkeeper.config.default_scopes, expires_in: SSO_TOKEN_INITIAL_DURATION, use_refresh_token: false, ) @@ -280,7 +278,7 @@ def get_sso_token(application, user) access_token = Doorkeeper::AccessToken.create_for( application: application.id, resource_owner: user.id, - scopes: default_scopes, + scopes: Doorkeeper.config.default_scopes, expires_in: SSO_TOKEN_INITIAL_DURATION, use_refresh_token: false )