This repository was archived by the owner on Oct 29, 2020. It is now read-only.
Fix bugs with Northstar auth verification.#6401
Merged
DFurnes merged 8 commits intoDoSomethingArchive:devfrom May 2, 2016
DFurnes:northstar-verify-touchups
Merged
Fix bugs with Northstar auth verification.#6401DFurnes merged 8 commits intoDoSomethingArchive:devfrom DFurnes:northstar-verify-touchups
DFurnes merged 8 commits intoDoSomethingArchive:devfrom
DFurnes:northstar-verify-touchups
Conversation
Was ambiguous what kind of ID it was without reading implementation.
This was previously being triggered by a hook that *also* occurred on register, so new accounts were failing “verify” step because they hadn’t been forwarded yet.
| * | ||
| * @param $user - Drupal user | ||
| * @param $northstar_response - Northstar user JSON response | ||
| */ |
Contributor
Contributor
Author
There was a problem hiding this comment.
Updated to use that method here in b27921d!
Contributor
|
👍 |
Contributor
Author
|
Could've sworn I already posted this somewhere, but dropping it here for future reference. Logging in to an existing account (from homepage or campaign signup) will verify user against Registering a new user will send new user to the Going to the “edit profile” page will send update to the |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What's this PR do?
This pull request includes cleanup and fixes to the Northstar auth verification & sync code:
🐛 The "verify" check was previously being run on newly registered users (before their profiles were synced to Northstar), resulting in "failed" validation and a bunch of users with
NONEsaved to their Northstar ID field. This PR moves this call to occur in a submit handler on the login form, rather than a Drupal hook. Also now just sends "username" and lets Northstar infer which type. (4a655c7)📄 Updates docblocks to try to make it clearer when different hooks and submit handlers are run, since it was ambiguous from looking at the method names without plopping
dpmhooks everywhere. (ab3ec96)👉 Adds a helper method to save the "Northstar ID" profile field, since the syntax is kinda wonky and it's nice to not have the same code duplicated all over. (71c70e8)
🍃 Removes some commented out code from the Northstar Guzzle implementation, since it was making that file harder to skim. Once we revisit #5932, hopefully we can start using the Northstar PHP library here instead! (3f86eb6)
🍂 General tidying up. (c502379, a7df8ff, 939b0bb)
How should this be manually tested?
It's probably easiest to just test this on staging TBH. But there should be significantly fewer cases where users have
NONEfor their Northstar ID field, since it's now properly set on registration.Any background context you want to provide?
👻
What are the relevant tickets?
References #6260.
For review: @angaither @weerd