Back

need different deeplink

  • 0
  • Android
  • Accounts
  • Self Hosted
Drake
27 Jul, 2023, 18:25

In the issue, you said:

so whenever the 2nd app logins the 1st apps session would be deleted

The cookie is deleted from the browser, but it should still also be in the 1st app and it should still work 🧐

TL;DR
The user is experiencing an issue with multiple sessions for the same project in different apps. They suggest not setting cookies for the default OAuth success to solve this problem. Another user suggests using a different custom domain for each app to solve the cookie problem. The user is also asked how they are getting around the callback deeplink problem. The issue seems to be related to using react native. However, it is pointed out that even with react native, the cookie should still work in the first app even if it is deleted from the browser. There is no clear solution provided in the support thread.
rohan
27 Jul, 2023, 18:27

the cookie is replaced the old session dosent exists

Drake
27 Jul, 2023, 18:28

ohhhhhhhhhh wait...it's because you're using react native

rohan
27 Jul, 2023, 18:28

Yes

rohan
27 Jul, 2023, 18:29

but i dont think so if react native is the cause for this

Drake
27 Jul, 2023, 18:29

yes because it's basically a web app and the cookies are shared. You'd have the same problem with 2 web apps using the same project

rohan
27 Jul, 2023, 18:30

as far as i checked the browser replaces the cookies for the new one.. making the old cookie invalid

Drake
27 Jul, 2023, 18:30

how are you getting around the callback deeplink problem?

rohan
27 Jul, 2023, 18:31

as of now im just manually selecting the requried app

rohan
27 Jul, 2023, 18:31

but the main problem was with multiple sessions for the same project in different apps

rohan
27 Jul, 2023, 18:32

which i fixed by not setting the cookie for the default Oauth success

Drake
27 Jul, 2023, 18:32

interesting...okay

Drake
27 Jul, 2023, 18:32

you can also solve the cookie probem by using a different custom domain for each app

rohan
27 Jul, 2023, 18:33

but thats a difficult solution...

rohan
27 Jul, 2023, 18:34

for my app use cases i have to make 3 to 4 different apps for the same project

rohan
27 Jul, 2023, 18:35

not setting the cookies for the default auth perfectly solves the issue for multiple sessions with same project

Drake
27 Jul, 2023, 18:36

why?

rohan
27 Jul, 2023, 18:38

need to configure the domain... then point it to the appwrite server.. then add it in the platform

rohan
27 Jul, 2023, 18:40

also if the deeplink session cookies are stored in the browser then the web-app which is based on the same project will automatically login.. and if the user logouts of the web-app.. the session is again deleted from both web-app and android app

Drake
27 Jul, 2023, 18:41

it might be a different context. im not sure

rohan
27 Jul, 2023, 18:43

but it's a valid use case... I have web-based app and also react native android app... whenever i log in to the react native.. the web app is automatically login..

rohan
27 Jul, 2023, 18:43

also is there any specific reason to set Cookies for the default Ouath link?

Drake
27 Jul, 2023, 19:08

not if you use a custom domain

Drake
27 Jul, 2023, 19:09

cookies are used for auth in general so that the browser automatically handles the session. for example, when using <img>

rohan
27 Jul, 2023, 19:13

yeah thats right... but it makes no valid reason to set it on the default oauth... for my uncerstanding people using oauth will have a valid redirect... only for those who use it as a deeplink uses default oauth

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more