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

Manage accounts in browser #361

Merged
merged 1 commit into from
Jan 7, 2025
Merged

Manage accounts in browser #361

merged 1 commit into from
Jan 7, 2025

Conversation

micahflee
Copy link
Contributor

Fixes #358.

This PR expects the server to be using https://github.com/lockdown-systems/cyd-server/pull/96.

Before, when you clicked the menu and clicked "Sign in to Cyd to access premium features", it would show the sign in modal, and then load dash inside of a webview in the app. Now, it opens dash in your default web browser by loading ${dashURL}/#/native-login/${userEmail}/${deviceToken}/manage. This route on the server automatically logs the user in using the app's device token.

For example, when you try using premium features and you're not logged in, it looks like this (which is how it looked before too):

Screenshot 2025-01-06 at 4 15 55 PM

When you click "Sign In" it opens the sign in modal, and you can sign in with an email. Before it would bring the user to dash in a webview, but now it opens dash in your browser and then looks like this:

Screenshot 2025-01-06 at 4 17 11 PM

Clicking "Manage My Account" opens dash in the browser again, and clicking "I've Upgraded" re-checks to see if you have premium. If you click it and you don't have premium, it shows this message for 5 seconds:

Screenshot 2025-01-06 at 4 17 46 PM

Over in dash, if you upgrade to premium, and then back in the app click "I've Upgraded", it brings you to the final page:

Screenshot 2025-01-06 at 4 18 21 PM

So the main difference is now we have an extra step. Whereas before, when the user upgrades to premium it would automatically bring them to the "Thanks for upgrading" screen, now they have to upgrade to premium in their browser and then manually click "I've Upgraded".

But this also greatly simplifies dash, and the app's interactions with it. We no longer have to be in a situation where the user is trying to manage their account within the app but they don't have a back button, or they can't open a Stripe receipt because it tries to open in a new tab, or any other problem that might arise when using dash in a webview instead of a real web browser.

…n a browser, signing in with the same device key as the app.
Copy link
Contributor

@redshiftzero redshiftzero left a comment

Choose a reason for hiding this comment

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

@micahflee micahflee merged commit a963047 into main Jan 7, 2025
1 check passed
@micahflee micahflee deleted the 358-manage-in-browser branch January 7, 2025 20:47
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.

Make Cyd Server sign in stuff all just use a web browser, instead of embedded in the app
2 participants