-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added OAuth2 Sign In support #1488
Conversation
Added sftp password notice.
Codecov Report
@@ Coverage Diff @@
## develop #1488 +/- ##
=============================================
- Coverage 35% 34.14% -0.87%
- Complexity 1846 1891 +45
=============================================
Files 368 370 +2
Lines 6062 6224 +162
=============================================
+ Hits 2122 2125 +3
- Misses 3940 4099 +159 |
Thanks for the contributions. I think it's a good feature and is close to being finished. Some important things to note:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate the effort, so don't let this review discourage you. Just pointing out areas that need improvement, looking forward to the final product. I've stopped here since theres a lot of things that apply to all of the files I've commented on. I'll continue this review once you've addressed these things.
|
||
$all_drivers = array_merge(preg_split('~,~', config('oauth2.all_drivers')), preg_split('~,~', $array['oauth2:providers:new'])); | ||
|
||
foreach (preg_split('~,~', $array['oauth2:providers:deleted']) as $provider) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these not just being JSON encoded before storage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's easier to edit manually and to store in the php file & inside the html input fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump cuz I forgot to mark as resolved and would need the rest to be reviewed,
If you would like me to change the UI to be the same as feature/vuejs and clean it up a little more (using vue) tell me.
|
||
$all_drivers = array_merge(preg_split('~,~', config('oauth2.all_drivers')), preg_split('~,~', $array['oauth2:providers:new'])); | ||
|
||
foreach (preg_split('~,~', $array['oauth2:providers:deleted']) as $provider) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's easier to edit manually and to store in the php file & inside the html input fields.
As we discussed on Discord, this is just too big of a change for me to feel okay merging in right now, especially with all of the massive changes in the development branch right now. Let's have a discussion and come back to this once 0.8 is released and we have a better idea of how things should work. |
Shame we need this! |
@VibeGAMESNL Look at #1964 |
Added the option to use OAuth2 to sign in instead of default username/email & password method
Functionality
Once enabled the route
<domain>/auth/login/oauth2
and<domain>/auth/login/oauth2/callback
will be available.When a user goes to that link it'll either redirect them to the OAuth2 authorization url or log them in he if already authorized.
This does not affect in any way the default sign in method.
Features (disabled if OAuth2 is disabled)
p:environment:oauth2
Screenshots (doesn't appear if OAuth2 is disabled)
User
Obvious password reminder for OAuth2 users
Admin
OAuth2 user
Non Oauth2 user
Demo
If you would like to test yourself (only for project team members) send me a message on discord with your github username and i'll create you an account and give you admin credentials.
https://pterodactyl.amnesia-network.com
EDIT: Re enabled password for OAuth2 users
EDIT 2: SFTP notice