You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @ChuckIrvine, this isn't directly in Pup but is possible. It involves a few steps:
The best place to start is by converting the /imports/ui/layouts/App/App.js component to a class-based component so that it has access to React state.
Next, you'll need to get access to the initial page the user is trying to access. This can come from JavaScript by looking at window.location when the page loads, or, you may be able to get this by implementing a custom router history and listening to it for changes. The idea here is that you use the history package to create a custom history and then pass it to the <Router /> component as the history prop.
Once you have the location they were trying to visit, you can set that on the <App /> component's this.state value. If you pass that (this.state.redirectTo, for example) down to your /login or /signup page, immediately after login you can say history.push(this.props.redirectTo) and go from there.
All of that said, I'm going to convert this into a feature request to implement into Pup. Far too many steps to have to guess/cobble together.
cleverbeagle
changed the title
user follow link, signup, navigate to authenticated page
Track initial URL request to redirect to after login/signup
Jan 10, 2018
I want to implement the following functionality:
Is this supported by pup? Any suggestions on a way to implement?
Thanks,
Chuck
The text was updated successfully, but these errors were encountered: