I am working on a project that is sharing the authentication system with another project.
The setup is like for users on my project to signin/authenticate with ic identity on my project they do so by using an authentication that is not my project but on the other project, through an iframe, and then when they finish authenticating, the identity data is sent through an iframe into my project with the postMessage.
So now my question is, with identity data, how can I sign it (or whatever the best term for the process is), with agent.js or a better package for the task if there is one, so that after obtaining the identity, it can be saved in my project as if the authentication had originally happened on my project so that I can perform all the other basic agentjs functionality like using using AuthClient to check isAuthenticated()
, or to getIdentity()
etc, but after having signed an identity data that isn’t originally from my project. Someone told be something like that is possible but I just don’t know how to really implement it. I am using React with Typescript