Advice needed: How to consolidate principals from .raw & non .raw domains?


I created an IC app and have users logging in using internet identity on my .raw and my non .raw domain. I did not setup alternative origins at the start. I tried doing that now but that makes the users on non raw domain to lose access to their original account.

What is the best way to consolidate these users.

Note: I store users principals on the backend.

On the IC level, I don’t think you can consolidate principals. If you want to migrate those to the non .raw / alternative origins principals, you would have to implement a migration on your side. Just a spontaneous thought though.

1 Like

Unfortunately, there is no way of consolidating principals.

As @peterparker said, the best way forward is to offer users a migration flow (i.e. have them sign in on raw and non-raw and associate both principals with the same account).

Going forward, if you ever change the URL under which your service is available, make sure to set up alternative origins before doing the URL change.

1 Like

Tagging @domwoe based on a conversation we had on the Dfinity Dev Office Hours regarding this.

@harshbaz can provide any other clarification/context if you have any questions :slight_smile: