Skip to content

Conversation

trodrigues
Copy link
Contributor

Simple workflow that uses querystring parameters to determine if a user can look at a page or not. Parameters can come from a form submission, or from an url with those parameters in.

While I understand this is definitely not the best way to do any sort of authentication, I was recently working on an app where this was desirable.

I extracted this flow out of that small app where the usage workflow can be something like:

  • new user comes in and uses the form to authenticate
  • user can then share the url with the auth parameters in the querystring if desired

If this is too much for an example I can try and slim it down to an async onEnter example, as that is my main reasoning for adding this. As far as I can tell there is currently no example which demonstrates that.

@trodrigues
Copy link
Contributor Author

Also as an aside, I have no idea why gh is highlighting a bunch of stuff in the code in red.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This single quote is why it's all red.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would I need to escape it or something? Atom didn't complain, and I also don't think it should. Unless these strings inside of JSX do need some special treatment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, it's just some funkiness with Linguist and its parsing of JSX within Javascript.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trodrigues Just to make this not so annoying, let's change the text to:

Hey, I see you are authenticated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done (I amended the commit)

Simple workflow that uses querystring parameters to determine if a user
can look at a page or not. Parameters can come from a form submission,
or from an url with those parameters in.
@timdorr
Copy link
Member

timdorr commented Apr 12, 2016

👍

@timdorr timdorr merged commit fcb5003 into remix-run:master Apr 12, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants