expo / expo-electron-adapter

This package wraps `electron-webpack` and adds support for Expo web and other universal React packages.
MIT License
29 stars 11 forks source link

Popup doesn't close after redirect using React Hooks in desktop app #17

Open ekolicicWF opened 2 years ago

ekolicicWF commented 2 years ago

Summary

• Use expo-auth-session Hooks as shown in the guides at this page: https://docs.expo.io/versions/latest/sdk/auth-session • Invoke the promptAsync function returned by useAuthRequest • A popup browser window opens which allows to authenticate to the external provider • In Web browser, Android and iOS emulators works as expected • In Electron desktop app : A popup browser window opens which allows to authenticate to the external provider. A /?code=XXXX… gets added to redirectUrl, but popup stays open • Closing popup window by clicking on ‘X’ throws an error: args.type: "dismiss"

What platform(s) does this occur on?

Web

SDK Version

No response

Environment

Expo Client, oAuth2 in Electron desktop app

Reproducible demo

The project code: https://github.com/ekolicicWF/electron-oAuth

yarn install yarn expo-electron start

username: bob password: bob