Example Code for Frontend Application Integration to Internet Identity

Looking at the document internet-identity/internet-identity-spec.adoc at main · dfinity/internet-identity · GitHub

I see “Frontend application can be served by canisters or by websites that are not hosted on the Internet Computer.”

For the various steps detailed out in the document under the section “Client authentication protocol”, is there sample code that shows how this is implemented on a frontend application of websites that are not hosted on the Internet Computer?

On the frontend side, the frontend here GitHub - krpeacock/auth-client-demo: Example demo of how to use https://www.npmjs.com/package/@dfi could easily be deployed anywhere. Once you have logged in, the authClient will have a cryptographically secure Identity that can resolve to a unique Principal id.

For a backend, You could use that Identity with confidence in a non-IC application that has its own logic to use the identity, since it’s based on open standards

1 Like