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

docs(examples): add custom session with passport #9125

Merged
merged 5 commits into from
Jul 17, 2024

Conversation

iamandrewluca
Copy link
Contributor

@iamandrewluca iamandrewluca commented May 1, 2024

2024-05-01.14-55-55.mp4

@iamandrewluca iamandrewluca force-pushed the examples/passportjs branch 2 times, most recently from 3a74499 to 9d98485 Compare May 1, 2024 13:05
Copy link

codesandbox-ci bot commented May 1, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 82455d8:

Sandbox Source
@keystone-6/sandbox Configuration

@iamandrewluca iamandrewluca force-pushed the examples/passportjs branch 4 times, most recently from 0f46604 to e8e2ca7 Compare May 1, 2024 13:50
@dcousens
Copy link
Member

dcousens commented May 1, 2024

I can't review this this week @iamandrewluca, but this looks amazing! 💛

@iamandrewluca
Copy link
Contributor Author

Great! I will also do a review myself, probably at the end of the week or next week. I Need to make some more adjustments.

@borisno2
Copy link
Member

borisno2 commented May 8, 2024

Nice work @iamandrewluca ! 💙

@iamandrewluca iamandrewluca marked this pull request as ready for review May 8, 2024 19:45
@iamandrewluca
Copy link
Contributor Author

iamandrewluca commented May 8, 2024

@borisno2 @dcousens PR is ready to be reviewed again!

@iamandrewluca iamandrewluca changed the title docs(examples): add passportjs usecase docs(examples): add custom session with passport May 9, 2024
@LabLamb
Copy link

LabLamb commented May 17, 2024

Nice! May I ask what is the password set to?

@iamandrewluca
Copy link
Contributor Author

iamandrewluca commented May 17, 2024

@LabLamb, what do you mean by that? Trolling? Spam soon?

@LabLamb
Copy link

LabLamb commented May 17, 2024

@LabLamb, what do you mean by that? Trolling? Spam soon?

For the native Keystone auth method there is a password, if we use SSO for creating the account, what method is used to craete an password for that the newly created account? Is it a random long string or blank?

@iamandrewluca
Copy link
Contributor Author

iamandrewluca commented May 17, 2024

In this case, there is no password. You always log in with SSO. SSO is responsible for user authentication.

This use case can be made to work in combination with both SSO and password.
In that case, a random password is generated when the user first logs in with SSO.
And later, they can decide to do a "forgot password" and start using username/password instead of SSO.

Even multiple providers can be added to SSO.

@borisno2 borisno2 requested a review from dcousens May 23, 2024 09:21
@dcousens
Copy link
Member

Squashed and rebased on main

@dcousens dcousens self-assigned this Jul 17, 2024
Copy link
Member

@dcousens dcousens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice work @iamandrewluca!

@dcousens dcousens merged commit ccc8117 into keystonejs:main Jul 17, 2024
1 check was pending
@iamandrewluca iamandrewluca deleted the examples/passportjs branch July 17, 2024 06:12
@dcousens dcousens mentioned this pull request Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants