Skip to content

Commit

Permalink
Fix user API scopes again
Browse files Browse the repository at this point in the history
  • Loading branch information
Dantemss committed Oct 21, 2024
1 parent 2e5e386 commit 5c5c92b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/controllers/api/v1/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand All @@ -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
)
Expand Down

0 comments on commit 5c5c92b

Please sign in to comment.