Skip to content

Commit

Permalink
feat: remove publicData scope when not required
Browse files Browse the repository at this point in the history
  • Loading branch information
Crypta-Eve committed Sep 7, 2024
1 parent f168045 commit 82c6a0a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Http/Controllers/Auth/SsoController.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ public function redirectToProvider($profile = null)
$used_scopes = $token->scopes;
}

if (count($used_scopes) > 1){
if (($key = array_search('publicData', $used_scopes)) !== false) {
unset($used_scopes[$key]);
}
}
// Store the scopes we are sending to CCP in the session so we can
// validate the JWT response contains the right scopes.
session()->put('scopes', $used_scopes);
Expand Down

0 comments on commit 82c6a0a

Please sign in to comment.