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

Usage with authentication_keys #25

Closed
bilouw opened this issue Mar 16, 2023 · 0 comments
Closed

Usage with authentication_keys #25

bilouw opened this issue Mar 16, 2023 · 0 comments

Comments

@bilouw
Copy link

bilouw commented Mar 16, 2023

Hi !

I want to use this gem for a model that need subdomain in addition of email to authenticate. This allow me to isolate customer bases.

Can i tell to devise-passwordless to include an additional parameters required to authenticate when we send the magic link ? Is there a way to handle my case with this gem ?

Thanks for your response.

EDIT: I edited the generated magic_link by hand to add an subdomain parameters and it works ! Now, i need to found a way to add this parameters to magic_link url properly, not by hand.

EDIT 2: I found that i can add my subdomain parameter directly in the mail template here:

<p>
<%= link_to "Log in to my account", send("#{@scope_name.to_s.pluralize}_magic_link_url", Hash[@scope_name, {email: @resource.email, token: @token, subdomain: @resource.subdomain, remember_me: @remember_me}]) %>
</p>

So now it's working with subdomain parameter, perfect :) ! I close the issue !

@bilouw bilouw closed this as completed Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant