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

Create migrate to remove authors table #17

Open
meltedspork opened this issue Jan 30, 2018 · 7 comments
Open

Create migrate to remove authors table #17

meltedspork opened this issue Jan 30, 2018 · 7 comments

Comments

@meltedspork
Copy link
Contributor

We are using Auth0's user database so there are no longer necessary for this.

CC: @kratsg

@meltedspork meltedspork self-assigned this Feb 2, 2018
@meltedspork meltedspork changed the title Create migrate to remove users table Create migrate to remove authors table Feb 6, 2018
@meltedspork
Copy link
Contributor Author

Are we removing whole table of authors ? @kratsg

@kratsg
Copy link
Contributor

kratsg commented Feb 6, 2018

We are. Need to update IDs everywhere to use the right one from auth0 -- but some testing is required, etc...

@meltedspork
Copy link
Contributor Author

i am thinking to keep this PR small.

first PR is to remove and second PR is to add from auth0

what can we take from auth0 in replace for?

@kratsg
Copy link
Contributor

kratsg commented Feb 10, 2018

auth0 provides a user id. But you should look at what's in the tokens they give us :)

@meltedspork
Copy link
Contributor Author

this is what we want to store? (not all of it of course) I am assuming - email, email_verfiied, family_name, given_name, groups, roles, and locale?

    "profile": {
        "email": "j*********@****.com",
        "email_verified": true,
        "family_name": "Salerno",
        "gender": "male",
        "given_name": "Jason",
        "https://api.signsfive.com/groups": [],
        "https://api.signsfive.com/roles": [],
        "locale": "en-US",
        "name": "Jason Salerno",
        "nickname": "jms******",
        "picture": "https://scontent.xx.fbcdn.net/v/t1.0-1/p50x50/path-to-my-fb-profile-pic",
        "sub": "facebook|0987654321",
        "updated_at": "2018-02-11T23:39:11.527Z"
    }
}```

@kratsg
Copy link
Contributor

kratsg commented Feb 12, 2018

Nope, we only need to store sub: facebook|0987654321 in your case. It specifies the main log-in authenticator provider and the ID for that. It's unique to everyone who logs in, in any way. Everything else we can ping auth0 for if we need the extra information. The access token provided to the API will contain the permissions. So no extra look up needed.

@kratsg
Copy link
Contributor

kratsg commented Feb 12, 2018

See https://tools.ietf.org/html/rfc7519#section-4.1.2 for details.

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

No branches or pull requests

2 participants