Conversation
|
|
||
| #### authenticated (bool) | ||
|
|
||
| If you want to know if there's an authenticated account, then include the `authenticated` context. |
Contributor
There was a problem hiding this comment.
Don't you mean "If you want to know if the user is authenticated or not, include the authenticated context."?
Contributor
Author
There was a problem hiding this comment.
That sounds better! Thanks!
Contributor
|
At step |
Contributor
Author
|
@timothyej All of these things have now been fixed except for the ES2015 semicolon. |
Contributor
|
Good work! 👍 ⭐ |
Contributor
Author
|
\o/ |
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.
Adds support for emitting
accountandauthenticatedcontexts from the Router.Note
I have deprecated the UserComponent and UserField, since those are no longer needed when we have the
accountcontext.How to verify
$ npm run build).$ npm link).$ npm link react-stormpath).src/pages/ProfilePage.js.accountcontext (as shown in this gist).$ npm start)./login./profile(the page we modified) and that the field values are shown.console.log(this.context.account);in therender()method of theProfilePageand verify that the account is written to console.undefinedwhen logged out, and an account object when logged in.authenticatedcontext.Documentation
See: https://github.com/stormpath/stormpath-sdk-react/blob/feature-context-support/docs/api.md#contexts
Fixes #1.