Add register mutation and alternate confirmation flow#185
Merged
mcelicalderon merged 3 commits intomasterfrom Jun 6, 2021
Merged
Add register mutation and alternate confirmation flow#185mcelicalderon merged 3 commits intomasterfrom
mcelicalderon merged 3 commits intomasterfrom
Conversation
a476e74 to
c7ca858
Compare
00dav00
approved these changes
May 31, 2021
| if resource.save | ||
| yield resource if block_given? | ||
|
|
||
| unless resource.confirmed? |
Contributor
There was a problem hiding this comment.
Will this consider skip_confirmation_notification ?
Member
Author
There was a problem hiding this comment.
Not really related, skip_confirmation_notification simply prevents regular devise email from going out. DTA does the same
| unless resource.confirmed? | ||
| resource.send_confirmation_instructions( | ||
| redirect_url: redirect_url, | ||
| template_path: ['graphql_devise/mailer'] |
Contributor
There was a problem hiding this comment.
Starting to feel we can have a common place for this path
|
|
||
| <p><%= link_to t('.confirm_account_link'), "#{message['schema_url']}?#{confirmation_query(resource_name: @resource.class.to_s, redirect_url: message['redirect-url'], token: @token).to_query}" %></p> | ||
| <p> | ||
| <% if message['schema_url'].present? %> |
Contributor
There was a problem hiding this comment.
Should this path trigger a deprecation warning?
Member
Author
There was a problem hiding this comment.
not sure we should do that here. Plus, any value can be passed to message, not sure it's necessary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements a new
registermutation as an alternative tosign_upwhich will be deprecated in the future. Also implements aconfirm_account_with_tokenmutation which confirms a resource by providing a token.registerchanges the account confirmation flow. It now takes aconfirm_urlargument which should be the url of a client application. The confirmation email will include a link toconfirm_urlwithconfirmationTokenas part of the query string. Then, the client application should use theconfirm_account_with_tokenmutation to confirm the resource if required.Resolves #184