Transfer session between web page and Electron app #3173
Replies: 1 comment
-
Hello @sergeyzenchenko It seems like you're on the right track. Ory Kratos supports social sign-in for native applications via OIDC and OAuth 2.0, which can be implemented in a similar way for Electron apps. Here's a high-level overview of the process:
When the user authenticates, they receive a session. The session is proof that the user is authenticated and allows them to interact with the system without the need to re-authenticate for every request. Sessions can be issued in two formats: Ory Session Cookie and Ory Session Token. Read more on this here. Unfortunately, we don't have specific documentation on implementing this in an Electron app. If you are still interested in it, feel free to open a feature request in https://github.com/ory/docs |
Beta Was this translation helpful? Give feedback.
-
Hi, I am implementing Kratos based auth for our system right now. In order to simplify user login with social logins, I want to open login page in user's web browser. The question is how to transfer it from web site into Electron app. It's possible to open custom protocol scheme registered by Electron app and pass Kratos session cookie or token from app based flow as a query parameter.
Important note: I am talking about opening window in user's system browser, not window opened as part of Electron app. So I do not have access to cookies directly.
It helps for example if user wants to login with Google and Google account is already loggined in user's system browser.
It will work, but I am not sure this is the best solution.
Do you guys have any other recommendation for this case?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions