Skip to content

Remove magicAuthLink and passwordResetLink functionality from @keystone-6/auth#9245

Merged
dcousens merged 14 commits intomainfrom
less-auth
Feb 4, 2025
Merged

Remove magicAuthLink and passwordResetLink functionality from @keystone-6/auth#9245
dcousens merged 14 commits intomainfrom
less-auth

Conversation

@dcousens
Copy link
Copy Markdown
Member

@dcousens dcousens commented Jul 30, 2024

This pull request removes the magicAuthLink and passwordResetLink functionality from @keystone-6/auth. The rationale is that this functionality is often unused and consequently unmaintained within the project.

While passwordResetLink functionality can be helpful, most projects I have seen have implemented their own versions, often finding the provided interface unsatisfactory. The community has shown that @keystone-6/auth does not adequately support this functionality, as seen in discussions like this one, leaving developers to write most of the feature themselves.

This change will reduce the complexity of the @keystone-6/auth module, which is a precursor to initiatives such as #8097.
#8097 and other initiatives seek to add support for advanced authentication methods (like MFA) and functionality to Keystone in a new and improved manner.

If you know of any projects that rely on these features and would be adversely affected by their removal, please share your experiences and use cases.

@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci bot commented Jul 30, 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 c27a3b8:

Sandbox Source
@keystone-6/sandbox Configuration

@andy-blum
Copy link
Copy Markdown

I'm using this functionality on a project right now and would be sad to see it go.

most projects I have seen have implemented their own versions, often finding the provided interface unsatisfactory.

I'm curious what shortcomings people are seeing in this and what DIY systems they're building. If this functionality is removed, I'd hope to see a good replacement suggestion in documentation.

@dcousens
Copy link
Copy Markdown
Member Author

dcousens commented Aug 2, 2024

@andy-blum fair point, maybe I can add an example to this pull request, and from there we can discuss how the example fairs compared to the inbuilt functionality.

@borisno2
Copy link
Copy Markdown
Member

borisno2 commented Aug 4, 2024

Looks good @dcousens - just put in a rough first pass example of a magicAuthExample without using the auth package in case that is useful

@socket-security
Copy link
Copy Markdown

socket-security bot commented Feb 4, 2025

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/chalk@4.1.2 None +1 52 kB sindresorhus

View full report↗︎

async resolve (args, { userId, token }, context: Context) {
if (!context.sessionStrategy) throw new Error('No session implementation available on context')

const kdf = (base.schema.getType('User') as any).getFields()?.password.extensions?.keystoneSecretField
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Don't love this, but I'll address somewhere else

@dcousens
Copy link
Copy Markdown
Member Author

dcousens commented Feb 4, 2025

Typescript errors will be fixed by #9402

@dcousens dcousens merged commit 2672109 into main Feb 4, 2025
44 of 45 checks passed
@dcousens dcousens deleted the less-auth branch February 4, 2025 08:28
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.

3 participants