If you’re already using npm, consider installing through npm. npm gives you more upgrade flexibility and allows you to tightly integrate our code with your build process.
Installation using a CDN is easy. Just include the following two lines in the <head>
of your website:
<link href="https://cdn.autheos.com//embedcode/latest/embedcode.min.css" rel="stylesheet" /> <script src="https://cdn.autheos.com//embedcode/latest/embedcode.min.js"></script>
Alternatively, if you want to be sure that nothing will break over time, the
latest keyword could be replaced with specifc version. Like this:
<link href="https://cdn.autheos.com//embedcode/1.2.3/embedcode.min.css" rel="stylesheet" /> <script src="https://cdn.autheos.com//embedcode/1.2.3/embedcode.min.js"></script>
The latest and current version could be found in here.
Of course, replace
with the CDN token you received from us. This is not the same token as a npm token. If you don’t have a CDN token yet, follow the prerequisite.
The embedcode is now exposed as
Autheos and can be accessed like so:
<script> Autheos.button(...) </script>
Are you getting an error like
Autheos is not defined? It may be that you’re using a module loader like RequireJS or Dojo. Read about UMD to learn more.