Hi Auth0 Community,
I’d like to share an Auth0 Polymer element which allows one to declaratively use Auth0 in their HTML using HTML Imports. The Polymer element supports the following Auth0 features:
- Auth0 Lock
- Hosted Pages
- Account Linking
- Delegation Token used to call the API of an Application Addon, such as Firebase.
It also includes a JWT manager that handles expiry of ID tokens.
You can find the source here . Alternatively you can add it to your project via
$ bower install auth0-element
Caveat: HTML Imports has not garnered enough support across the different browsers & the standards committee. Also Polymer 3 has shifted away to using ES6 modules. While I’m looking to support Polymer 3, if you’re starting a new project and would like to use web components, I’d recommend you to look at lit-element or lit-html instead, which is where the new Polymer direction is heading.