#[SOLVED] Multiple user accounts for 1 user

37 messages · Page 1 of 1 (latest)

versed girder
#

I was wondering if someone has a smart solution for my problem 🙂
I am working on a project where a customer works at different companies. The customer creates an account at my app for Company1, completes his profile settings and wants to add his second account for Company2 to the same profile account as Company1. Both with OAUTH.
I can create a table in between as relation table from User Account to Profile, but i still have an issue. Everything the customer does when he is logged in as Company1 its documents will be created with his current userId. When he logs in as Company2 then he no longer has permission to edit them.

Does someone has a smart solution that i didnt think of?

scarlet otter
versed girder
scarlet otter
#

In 1.5.5, you can go to Auth > User and there's an identities tab

versed girder
#

omg, that is so awesome!

versed girder
#

Getting a bad request when i OAuth in the current session, and starting a new login request. I am using createOAuth2Token, is that the correct one to add an extra identity?

#

Ah, i think i need createOAuth2Session

#

Which isnt available in node-appwrite (yet?)

scarlet otter
versed girder
#

I am looking at the problem. I am using the cookie i got from the first authentication, that should be fine i guess?

#

And then this happens

versed girder
#

Ah fixed now. The oauth endpoint was trying to set the cookie again.

versed girder
scarlet otter
versed girder
#

I think i really need the CreateOAuth2Session

scarlet otter
versed girder
#

Ah, so client side it is

versed girder
scarlet otter
versed girder
#

cloud.

#

Working with localhost in dev mode

scarlet otter
versed girder
#

Yeah, i am running now into a new problem. All of a sudden i get 'TypeError: e._formData.get is not a function'. Research online does give some results about appwrite usage

#

I am closing my eyes for now, driving me crazy these problems 🥲

scarlet otter
versed girder
#

It doesnt seem to be the case

#

hmm, possible the other way around, the node-appwrite in client side

scarlet otter
versed girder
#

{SOLVED} Multiple user accounts for 1 user