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

Also check for shortLivedToken when signing in with shortLivedAuthToken #14045

Merged
merged 5 commits into from
Jan 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/pages/LogInWithShortLivedAuthTokenPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const propTypes = {
/** Short lived authToken to sign in a user */
shortLivedAuthToken: PropTypes.string,

/** Short lived authToken to sign in as a user, if they are coming from the old mobile app */
shortLivedToken: PropTypes.string,

/** The email of the transitioning user */
email: PropTypes.string,
}),
Expand All @@ -21,7 +24,9 @@ const propTypes = {
class LogInWithShortLivedAuthTokenPage extends Component {
componentDidMount() {
const email = lodashGet(this.props, 'route.params.email', '');
const shortLivedAuthToken = lodashGet(this.props, 'route.params.shortLivedAuthToken', '');

// We have to check for both shortLivedAuthToken and shortLivedToken, as the old mobile app uses shortLivedToken, and is not being actively updated.
alex-mechler marked this conversation as resolved.
Show resolved Hide resolved
const shortLivedAuthToken = lodashGet(this.props, 'route.params.shortLivedAuthToken', '') || lodashGet(this.props, 'route.params.shortLivedToken', '');
Session.signInWithShortLivedAuthToken(email, shortLivedAuthToken);
}

Expand Down