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

Update custom auth generator to generate auth client #3617

Closed
7 tasks
dac09 opened this issue Oct 22, 2021 · 6 comments · Fixed by #5985
Closed
7 tasks

Update custom auth generator to generate auth client #3617

dac09 opened this issue Oct 22, 2021 · 6 comments · Fixed by #5985

Comments

@dac09
Copy link
Collaborator

dac09 commented Oct 22, 2021

What?

Currently the custom auth generator just changes App.tsx/js with the Auth provider, and generate src/lib/auth for the API side

However, its missing a crucial piece - generating the "scaffold" or an unimplemented custom auth client for the web side

Why?

Often when you create a custom auth, you're looking for more control over the methods used to login/signup/logout - even if its a provider that we officially support.

Things to consider

  • Generate AuthProvider for web
  • Generate AuthClient to pass to the AuthProvider
  • Modify App{.tsx/js} (and maybe other relevant parts of web) to use these custom client and provider
  • Make sure useAuth uses custom client (or generate a customUseAuth hook)
  • Do we need to update the types for AuthClient to be more flexible with types? I don't think so, but worth checking
  • We don't want to encourage "all sorts" of auth at this stage. The limitation around the custom auth client should be that it uses a bearer token in requests, and sets the auth-provider to custom, the same way all the other auth providers do.
  • Provide documentation on how all this works, including if we want a custom serverless function to do the auth functionality for us (kind of like how dbAuth does)
@dac09
Copy link
Collaborator Author

dac09 commented Oct 22, 2021

@doesnotexist - you might be interested in this one :)

@doesnotexist
Copy link
Contributor

@dac09 I am, let me take a closer look in the next few days.

@doesnotexist
Copy link
Contributor

Also, I think this issue dovetails nicely with #1585

@thedavidprice
Copy link
Contributor

Hi all! Any further thoughts about this one? Especially when/if to prioritize it on the roadmap?

@doesnotexist
Copy link
Contributor

Sorry, I haven't had a chance to really look into this or the related issue. I'm happy if anyone else wants to take a crack, otherwise I'll try to come back to it in a few weeks time.

@thedavidprice thedavidprice removed their assignment Nov 4, 2021
@thedavidprice thedavidprice moved this from New issues to Icebox (post v1-RC priorities) in Current-Release-Sprint Nov 4, 2021
@jtoar jtoar removed this from Icebox (post v1-RC priorities) in Current-Release-Sprint Dec 9, 2021
@jtoar jtoar removed the next label May 5, 2022
@Tobbe
Copy link
Member

Tobbe commented Aug 7, 2022

Work on this is ongoing in #5985

Most things in Danny's list are already handled. Only thing I'm not doing is anything that touches stuff on the api side

@Tobbe Tobbe mentioned this issue Aug 7, 2022
28 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants