Skip to content

Commit

Permalink
feat(oauth): add support for custom scopes (#730)
Browse files Browse the repository at this point in the history
* Update config to include OAUTH_SCOPES env var

* chore: add 'OAUTH_SCOPES' in .env.example

---------

Co-authored-by: Dave Roverts <roverts.dave@gmail.com>
  • Loading branch information
CalumTowers and daveroverts authored Sep 28, 2023
1 parent 22e9745 commit e2a9cb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
OAUTH_BASE=https://auth.vatsim.net
OAUTH_CLIENT=
OAUTH_SECRET=
OAUTH_SCOPES="full_name,email"

# OAuth variable mapping, leave it as is for Vatsim Connect
# This allows you to fit the data validation your OAuth2 service, the - character indicates array structure
Expand Down
2 changes: 1 addition & 1 deletion config/oauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
/**
* The scopes the user will be requested
*/
'scopes' => explode(',', "full_name,email"),
'scopes' => explode(',', env('OAUTH_SCOPES', 'full_name,email')),

/*
* OAuth variable mapping
Expand Down

0 comments on commit e2a9cb0

Please sign in to comment.