Skip to content
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

OAUTH_USERS.USER_ID is missing #11

Closed
ybelenko opened this issue Aug 1, 2019 · 4 comments
Closed

OAUTH_USERS.USER_ID is missing #11

ybelenko opened this issue Aug 1, 2019 · 4 comments

Comments

@ybelenko
Copy link
Contributor

ybelenko commented Aug 1, 2019

Can't understand where is user_id column in following table:

CREATE TABLE oauth_users (
username VARCHAR(80),
password VARCHAR(80),
first_name VARCHAR(80),
last_name VARCHAR(80),
email VARCHAR(80),
email_verified BOOLEAN,
scope VARCHAR(4000)
);

@dsquier
Copy link
Owner

dsquier commented Apr 14, 2020

I do not believe user_id is part of the OAuth spec, which is why it is not included. If this is part of the library, I can see reason to include it. If you can point to this in the code, I'm happy to take a PR.

@ybelenko
Copy link
Contributor Author

@dsquier Wow. I'm so lucky to finally meet you here. We looked for other packages because cannot reach you. Can you say what this repo's license?

@ybelenko
Copy link
Contributor Author

We discuss integration of your schema into openapi-generator project in OpenAPITools/openapi-generator#5807

@ybelenko
Copy link
Contributor Author

ybelenko commented Apr 21, 2020

I've spent some time checking implementations. This User ID | OAuth2 Server PHP link says that user_id is optional parameter, so oauth_access_tokens.user_id != oauth_users.username.

However following implementation says:

https://github.com/bshaffer/oauth2-server-php/blob/c0c5f2c9ee1e676920062653b2d7b9e9095cd860/src/OAuth2/Storage/Pdo.php#L456-L459

// the default behavior is to use "username" as the user_id
return array_merge(array(
    'user_id' => $username
), $userInfo);

I think issue can be closed, because I didn't find any doc to prove my point.

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

No branches or pull requests

2 participants