dfinity / wg-identity-authentication

Repository of the Identity and Wallet Standards Working Group
https://wiki.internetcomputer.org/wiki/Identity_%26_Authentication
Apache License 2.0
26 stars 8 forks source link

ICRC-29 Allow redirect by signer to different origin #182

Closed sea-snake closed 2 weeks ago

sea-snake commented 1 month ago

Updated the spec to allow for redirect by the signer to a different origin. Previously a PR was made to switch to polling to make this possible but e.g. the authentication part in the spec did not allow for a signer origin that changes due to e.g. a redirect.

Also a note has been added regarding closing the signer window.

sea-snake commented 1 month ago

After some more testing, if the signer redirects after the page has loaded with e.g. JS, the opener will be lost after the redirect to the new domain. But if the redirect to another domain is done by e.g. a 301 or 308 http response header, the opener will be available and working.

So the changes in this MR will enable a signer to change it's domain name while not breaking relying parties that still interact with the old domain name (redirect to new domain).

sea-snake commented 1 month ago

Updated implementation that includes these changes can be found at https://github.com/slide-computer/signer-js/blob/main/packages/signer/src/icrc29/postMessageTransport.ts

sea-snake commented 3 weeks ago

@frederikrothenberger Updated the MR as discussed in last WG meeting.