-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[dev-launcher] move session fns from dev-menu to dev-launcher i #16124
[dev-launcher] move session fns from dev-menu to dev-launcher i #16124
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally looks really good, just a few thoughts/questions
export const apiEndpoint = __DEV__ ? `https://exp.host/--/graphql` : `https://exp.host/--/graphql`; | ||
export const websiteOrigin = __DEV__ ? 'https://expo.dev' : 'https://expo.dev'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is an intentional change we should just get rid of the ternary operator entirely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do! this was intentional as updating the api calls ended up being a bit more complicated - better suited for a different PR
@@ -44,3 +51,117 @@ export async function copyToClipboardAsync(content: string): Promise<null> { | |||
export const clientUrlScheme = DevLauncher.clientUrlScheme; | |||
export const installationID = DevLauncher.installationID; | |||
export const isDevice = !!DevLauncher.isDevice; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think there is value in keeping the auth session / web browser stuff as a separate native module, even if it lives inside the dev launcher package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that makes a lot of sense
manager.sendEventToDelegateBridge(DevMenuExpoSessionDelegate.userLoginEvent, data: nil) | ||
} else if wasLoggedIn && !isLoggedIn { | ||
manager.sendEventToDelegateBridge(DevMenuExpoSessionDelegate.userLogoutEvent, data: nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these events unused now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes that's correct
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
Co-authored-by: Łukasz Kosmaty <lukasz.kosmaty@swmansion.com>
Co-authored-by: Łukasz Kosmaty <lukasz.kosmaty@swmansion.com>
Co-authored-by: Łukasz Kosmaty <lukasz.kosmaty@swmansion.com>
Co-authored-by: Łukasz Kosmaty <lukasz.kosmaty@swmansion.com>
Co-authored-by: Łukasz Kosmaty <lukasz.kosmaty@swmansion.com>
Co-authored-by: Łukasz Kosmaty <lukasz.kosmaty@swmansion.com>
Co-authored-by: Łukasz Kosmaty <lukasz.kosmaty@swmansion.com>
Co-authored-by: Łukasz Kosmaty <lukasz.kosmaty@swmansion.com>
Co-authored-by: Łukasz Kosmaty <lukasz.kosmaty@swmansion.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Why
The new dev-launcher is now responsible for the user auth and session management - but these functions were still living in the dev-menu package - this PR aims to move the functionality into
dev-launcher
in an effort to clean things upAndroid implementation is not yet done
How
Moved all the functions related to user auth from dev menu into the dev-launcher package - in order to do so I had to reimplement a few things in objective-c
Test Plan
Checklist
expo build
(eg: updated@expo/xdl
).expo prebuild
& EAS Build (eg: updated a module plugin).