trigger.dev icon indicating copy to clipboard operation
trigger.dev copied to clipboard

feat: disabling authentication for local testing

Open zeyaddeeb opened this issue 1 year ago • 3 comments

I just want to see if you guys are open to this. I wanted to test locally and auth is sometimes not required

✅ Checklist

  • [ ] I have followed every step in the contributing guide
  • [ ] The PR title follows the convention.
  • [ ] I ran and tested the code works

Testing

[Describe the steps you took to test this change]


Changelog

[Short description of what has changed]


Screenshots

[Screenshots]

💯

zeyaddeeb avatar Sep 14 '24 15:09 zeyaddeeb

⚠️ No Changeset found

Latest commit: 42c8fda3fa91ceeb439b471592121c2a47dae2a7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Sep 14 '24 15:09 changeset-bot[bot]

@zeyaddeeb when you're developing locally you can sign in with any email address using magic link and it doesn't require confirmation. It instantly logs you in. This is based on NODE_ENV being "development": https://github.com/triggerdotdev/trigger.dev/blob/c1690bd1ae1df93def377265c917bddec2665551/apps/webapp/app/services/email.server.ts#L36

I think this achieves the same as what you want but also allows you to have many accounts which is really useful during development.

matt-aitken avatar Sep 14 '24 16:09 matt-aitken

I wanted to kill auth all together, any ideas?

zeyaddeeb avatar Sep 14 '24 19:09 zeyaddeeb

This approach alone won't work because you need the user to actually exist in the database for everything else to work.

I'm still not clear exactly on the use case for this given when running locally magic link just auto-logs you in without needing verification.

matt-aitken avatar Feb 28 '25 16:02 matt-aitken