summaryrefslogtreecommitdiffstats
path: root/webapp/components
diff options
context:
space:
mode:
authorDavid Meza <dmeza@users.noreply.github.com>2017-05-25 09:49:46 -0500
committerChristopher Speller <crspeller@gmail.com>2017-05-25 10:49:46 -0400
commit554938a8403a00dda36c77b288dafe374dd2430e (patch)
tree912f12ede7b7ec81397acba299aa5cf8e05d27e0 /webapp/components
parentb28227ff6b63ee564a91e06f1bac445d333d87d6 (diff)
downloadchat-554938a8403a00dda36c77b288dafe374dd2430e.tar.gz
chat-554938a8403a00dda36c77b288dafe374dd2430e.tar.bz2
chat-554938a8403a00dda36c77b288dafe374dd2430e.zip
Add RedirectTo after login for Universal linking or deep linking to work (#6304)
Diffstat (limited to 'webapp/components')
-rw-r--r--webapp/components/login/login_controller.jsx2
-rw-r--r--webapp/components/root.jsx2
2 files changed, 2 insertions, 2 deletions
diff --git a/webapp/components/login/login_controller.jsx b/webapp/components/login/login_controller.jsx
index c9930c406..cef7fe435 100644
--- a/webapp/components/login/login_controller.jsx
+++ b/webapp/components/login/login_controller.jsx
@@ -213,7 +213,7 @@ export default class LoginController extends React.Component {
finishSignin(team) {
const query = this.props.location.query;
GlobalActions.loadCurrentLocale();
- if (query.redirect_to) {
+ if (query.redirect_to && query.redirect_to.match(/^\//)) {
browserHistory.push(query.redirect_to);
} else if (team) {
browserHistory.push(`/${team.name}`);
diff --git a/webapp/components/root.jsx b/webapp/components/root.jsx
index 0332a8e0a..9e9ed1111 100644
--- a/webapp/components/root.jsx
+++ b/webapp/components/root.jsx
@@ -96,7 +96,7 @@ export default class Root extends React.Component {
} else if (UserStore.getCurrentUser()) {
GlobalActions.redirectUserToDefaultTeam();
} else {
- browserHistory.push('/login');
+ browserHistory.push('/login' + window.location.search);
}
}
}