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

Fix Jetpack SSO Compatibility #276

Merged
merged 1 commit into from
Apr 12, 2019
Merged

Fix Jetpack SSO Compatibility #276

merged 1 commit into from
Apr 12, 2019

Conversation

joshbetz
Copy link
Collaborator

After SSO, we successfully see the two factor verification. The problem is that the query string for SSO is like ?action=jetpack-sso&result=success&user_id=<redacted>&sso_nonce=<redacted>. If we try to redirect back to that page, we get into a loop where SSO tries to login again, even though we're already logged in (and the nonce is no longer valid). We can redirect to /wp-admin/ instead of REQEUST_URI.

After SSO, we successfully see the two factor verification. The problem is that the query string for SSO is like `?action=jetpack-sso&result=success&user_id=<redacted>&sso_nonce=<redacted>`. If we try to redirect back to that page, we get into a loop where SSO tries to login again, even though we're already logged in (and the nonce is no longer valid). We can redirect to /wp-admin/ instead of `REQEUST_URI`.
Copy link
Collaborator

@kasparsd kasparsd left a comment

Choose a reason for hiding this comment

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

Looks good! Can't think of any scenarios where this could cause a problem.

@kasparsd kasparsd merged commit 5ae6b1b into master Apr 12, 2019
@kasparsd kasparsd deleted the fix/jetpack-sso-compat branch April 12, 2019 16:41
joshbetz added a commit to Automattic/vip-go-mu-plugins that referenced this pull request Apr 12, 2019
Allows two-factor to work with Jetpack SSO

WordPress/two-factor#276
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

Successfully merging this pull request may close these issues.

2 participants