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

Social Signup: Handle the case where users block third-party cookies/data #13983

Merged
merged 14 commits into from
May 29, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Tweak the copy.
  • Loading branch information
pento authored and drewblaisdell committed May 24, 2017
commit a25780cd55c5e248068a4778fa3f0bb32c833dc8
6 changes: 2 additions & 4 deletions client/components/signup-form/social.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class SocialSignupForm extends Component {
return (
<div className="signup-form__social">
<p>
{ this.props.translate( 'Or create account using social profile:' ) }
{ this.props.translate( "Or create account using social profile. We'll never post without your permission." ) }
</p>

<div className="signup-form__social-buttons">
Expand All @@ -57,9 +57,7 @@ class SocialSignupForm extends Component {
</div>

<p>
{ this.props.translate(
"Connect to your existing social profile to get started faster. We'll never post without your permission."
) }
{ this.props.translate( 'Connect to your existing social profile to get started faster.' ) }
Copy link

Choose a reason for hiding this comment

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

😞 17 existing translations will be lost with this change.

</p>
</div>
);
Expand Down
4 changes: 1 addition & 3 deletions client/components/social-buttons/google.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ class GoogleLoginButton extends Component {

if ( 'idpiframe_initialization_failed' === error.error ) {
// This error is caused by 3rd party cookies being blocked.
this.setState( { error: translate( 'Your privacy settings are blocking us from connecting to your Google account. ' +
'Please enable "third-party cookies" in your browser or operating system, or sign up with an email address instead.'
) } );
this.setState( { error: translate( 'Please enable "third-party cookies" to connect your Google account.' ) } );
return null;
Copy link
Member

Choose a reason for hiding this comment

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

@Tug should we return rejected Promise in this case, too?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I believe we can simply remove that return statement.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If i removed the return null, the console shows a JS error:

Object {error: "idpiframe_initialization_failed", details: "Failed to read the 'localStorage' property from 'Window': Access is denied for this document."}

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's fine to show an error in the console here. if we want to hide it in a debug() call for instance, that should be done by calling catch on the promise returned by this.initialize().

}

Expand Down