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

Branch using react-router-dom #23

Open
eloekset opened this issue Mar 24, 2019 · 6 comments
Open

Branch using react-router-dom #23

eloekset opened this issue Mar 24, 2019 · 6 comments

Comments

@eloekset
Copy link

This sample is based on react-router 2.0. The router has changed a lot since that version, which makes it difficult to follow the sample today.

Would someone create a branch of this project to demo how to use redux-oidc with react-router-dom 4.X? This is a migration guide for the router: https://github.com/ReactTraining/react-router/blob/25776d4dc89b8fb2f575884749766355992116b5/packages/react-router/docs/guides/migrating.md#the-router

@eloekset
Copy link
Author

I'm still struggling creating an app from this sample. How about creating a branch to demonstrate how to implement this for React 16? Related question: https://www.reddit.com/r/reactjs/comments/7bo3j0/react_v16_with_redux_oidc_and_router/

@AnthonyCrowcroft
Copy link

having a similar issue the blocker I'm having issues with is that after the callback it is changing the url but not rerendering

@AnthonyCrowcroft
Copy link

@maxmantz what is the expected manner in which we allow OIDC to log users out when there session has failed to renew or they sign out... trying to get this working with connected-react-router, react-router-dom, react-router, redux, react-redux and this seems to be my last hang up if i can get this ressolved happy to make a pull request with an updated example.

@eloekset
Copy link
Author

I'm now taking up my pet project again, and revisited this issue after doing some recap. Have you found a way around this issue, @AnthonyCrowcroft?

@maxmantz
Copy link
Owner

The choice of routing library is secondary to the problem faced when implementing this library.

The steps needed to successfully implement OIDC with this libary are as follows:

  • register a route (e.g. /callback) with the router to allow the reception of the token to your app,
  • optional but strongly recommended: generate a second HTML file for the silent renewal of tokens

I understand that the process of implementing this can be tricky, especially when dealing with different routing libraries or different versions of the same library. I will happily accept a PR for the example app which demonstrates using react-router-dom. I will also happily link to any examples repos you guys can give me regarding this.

@anandyadavalli
Copy link

I implemented the logic suggested in the sample app and also registered the callback path with the router but i keep on getting the following error during callback:

HTTP Error 405.0 - Method Not Allowed
The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.

Module | StaticFileModule
ExecuteRequestHandler
StaticFile

Requested URL | https://localhost:5001/index.html

Anyone have any ideas on how to fix this issue?

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

4 participants