Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

Create an user #12

Open
thujohn opened this issue Sep 12, 2013 · 7 comments
Open

Create an user #12

thujohn opened this issue Sep 12, 2013 · 7 comments

Comments

@thujohn
Copy link

thujohn commented Sep 12, 2013

Hi.

Have you planned to add a method for creating a user if he doesn't exist ?

Cordially.

@thomaswelton
Copy link
Owner

Yeah, I'd want that feature. Few things holding it up.
From the PHPOauthLib repo daviddesberg/PHPoAuthLib#32 I'd want my code to get profile information (which I already have) https://github.com/thomaswelton/laravel-oauth/tree/master/src/Thomaswelton/LaravelOauth/Common/User to be decoupled from my component so I can contribute back to the PHPoAuthLib

Then also, I'm not sure how people would want to use this. Each laravel app may have a different required schema for the users table. Some my require names, emails last name / first name ect.
I'm not sure how I could implement this in a way that would allow people to customize the account creation.

Right now there is an undocumented method. OAuth::associate() that will link the current logged in user to an OAuth provider.

I need to document my recent changes and am then going to tag my first release.
If you're interest I'd suggest you follow this repo, thanks for the interest.

@msurguy
Copy link

msurguy commented Sep 16, 2013

Thanks for crating the migrations and the rest to make the associate() work! Looking good!

@thomaswelton
Copy link
Owner

Thanks! I've picked this project back up tonight, working on it right now. Hoping to tag a release soon.

For user creation I'm thinking that I should just provide a simple way for you to get user details. And then allow people to create their own users and associate them using their own app logic. We'll see what we can do for later releases.

@msurguy
Copy link

msurguy commented Sep 16, 2013

Cool! This is going to be the best oAuth package for Laravel! Signed up for all notifications! Thanks for the great work!

@landjea
Copy link

landjea commented Nov 15, 2013

As an alternate opinion : please don't ever do this. I would much prefer that your oAuth package strictly takes care of the oAuth requirements. I will manage my user creation on my own. If you do implement this, please make it an option in the config to disable it.

.....Actually, I would prefer there be no database work at all done by this package, not even during the handshakes. Just token movement / handshakes and that's all. There are plenty of full-swiss-army-knife packages out there that handle authorization AND access control. I could grab one of those if I wanted that. Just oAuth tokens is my preference. :)

@thomaswelton
Copy link
Owner

I do a agree with you.
This would simplify the package.
And TBH user creation is not hard when using other packages.

I do think it might be handy to provide a unified API to get basic user data to help with user creation. But maybe that should belong in another package.

I just was hoping to make a one click login and creation in laravel super simple.

Anyway I was really pleased to see your PR. And if you want to be a contributor we should chat sometime and open up push access to the repo. But first I/we need to write some tests :)

On 15 Nov 2013, at 23:51, Jean-Guy Landriault [email protected] wrote:

As an alternate opinion : please don't ever do this. I would much prefer that our oAuth package strictly takes care of the oAuth requirements. I will manage my user creation on my own. If you do implement this, please make it an option in the config to disable it.

.....Actually, I would prefer there be no database work at all done by this package, not even during the handshakes. Just token movement / handshakes and that's all. There are plenty of full-swiss-army-knife packages out there that handle authorization AND access control. I could grab one of those if I wanted that. Just oAuth tokens is my preference. :)


Reply to this email directly or view it on GitHub.

@landjea
Copy link

landjea commented Nov 16, 2013

Sounds good.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants