luckyframework / authentic

An authentication library for Lucky projects
MIT License
14 stars 13 forks source link

Make Avram a real dependency #69

Closed matthewmcgarvey closed 2 years ago

matthewmcgarvey commented 2 years ago

Fixes #68

jwoertink commented 2 years ago

I'm not sure I understand this one 🤔 You can't use Authentic without Avram, so we have to ensure Avram is required before Authentic. If someone removes Avram, but left Authentic, that would break things. Maybe Avram should be a regular dependency instead of dev dependency?

matthewmcgarvey commented 2 years ago

None of the code in authentic is actually dependent on Avram, though. It just plays a part in the large context. Also, the lucky website uses authentic without Avram. Not too sure why it is, but I had issues when trying to remove it.

jwoertink commented 2 years ago

This method requires Avram

https://github.com/luckyframework/authentic/blob/44649db8a0a63b31b7b8065453a320e03b4eba89/src/authentic.cr#L117-L119

which is used in the SignUpUser operation

https://github.com/luckyframework/lucky_cli/blob/522c046f6cc3306c416a5c5175d589d5fd8bc682/src/base_authentication_app_skeleton/src/operations/sign_up_user.cr#L10-L13

As for the website, I think we actually left it in there as a safety net. We would use the website as our app to catch anything we may have broken. I'm cool with removing it though. I have a separate project started that will be better suited for that sort of thing.

matthewmcgarvey commented 2 years ago

@jwoertink good find! I don't know why I didn't see that method before. I went ahead and updated this PR to move avram to a full-fledged dependency