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

[WIP] [Connect] Add logout() #4055

Closed
wants to merge 4 commits into from

Conversation

mludowise-stripe
Copy link
Collaborator

@mludowise-stripe mludowise-stripe commented Sep 25, 2024

Summary

Adds the logout() call to EmbeddedComponentManager

In order to ensure that logout works, even when no components have been created, a webview is instantiated in the background so we can call window.logout() to clear cookies and make a call to the logout endpoint.

Motivation

https://jira.corp.stripe.com/browse/MXMOBILE-2488

Testing

XCTAssertEqual(
LogoutSender().javascriptMessage,
"""
window.logout({});
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ideally this would be empty args, but there's no easy way to do that with the MessageSender. I tested that sending extra arguments to this function doesn't seem to have any negative effect in JS.

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.

1 participant