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

Document Implementation in Existing Apps #52

Open
type1fool opened this issue Sep 19, 2023 · 4 comments
Open

Document Implementation in Existing Apps #52

type1fool opened this issue Sep 19, 2023 · 4 comments
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed
Milestone

Comments

@type1fool
Copy link
Collaborator

type1fool commented Sep 19, 2023

As of v0.6.0, WebauthnComponents can be used to easily scaffold Passkey authentication in new Phoenix apps. For existing applications with password-based authentication or 0Auth, more extensive documentation is needed.

@type1fool type1fool modified the milestones: Beta, v1 Sep 19, 2023
@type1fool type1fool added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Sep 19, 2023
@peaceful-james
Copy link
Contributor

Hi @type1fool. In a hobby project, I very recently replaced a standard phx.gen.auth password system with the current wac.install code.

To do it, I created a brand new phoenix project, ran mix format, committed to git and then ran wac.install and committed the diff again. By exporting the diff, I went through all the modified, created and deleted files 1-by-1 and changed what was needed in my hobby project.

One of the big sticking points for me was the use of OLID. I experimented with migrations that would generate new primary keys and such but it became quite difficult (for me). I ended up reverting to standard :binary_id. Hopefully someday the standard binary_id in generators will be UUIDv7.

Anyway, would you accept a "How To" guide written by an enthusiastic noob who discards the use of OLID? If OLID usage is to be conserved then I am unable to write such a guide.

@type1fool
Copy link
Collaborator Author

@peaceful-james ULID may indeed be a bad fit for the package. It was carried over from the application where I started developing Passkey support, but I recognize it's possibly not ubiquitous enough to be a default.

UUIDv7 would be preferred once it's supported by Ecto. There are a few packages floating around which could help, but I would wait till support is baked into Ecto proper.

Your contributions would be welcome whether they're focused on documentation or enhancements. I appreciate your feedback. 🙏

@peaceful-james
Copy link
Contributor

peaceful-james commented Jun 27, 2024

I agree it would be wise to wait until UUIDv7 is native to Ecto.

I will do my best to write up a guide for replacing a phx.gen.auth project. I might open a few other PRs along the way, to address any issues I open here. I'm still knee-deep in my own implementation. The devil is in the details!

@peaceful-james
Copy link
Contributor

There is a robust UUIDv7 lib https://elixirforum.com/t/uuidv7-a-uuid-v7-implementation-and-ecto-type-for-elixir-based-on-rust/56666/8

I think it would be acceptable for the generator to add this lib to the deps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed
Projects
Development

No branches or pull requests

2 participants