It's a universal authentication system that helps to add an authentication backend to any website without any massive block of code. All you need is just a script tag that composes all the functionalities.
There are many scenarios where you can make the best of its use:
- Limited and genuine access: OneAuth is very helpful if you want your website to be free from bot access or attacks.
- Only registered users: : If the user is authenticated, only then are they allowed to access your site. Rest we will handle 😎
It's very easy, just follow the following steps:
- Paste the following
<script>
tag in thesection of your HTML file.
- Remember to add the above script only in the main/home page of your website.
<script async type="text/javascript" src="https://cdn.jsdelivr.net/gh/dev3058/OneAuthCdnData@a6a8bd273623f47402f037d7367312105b8913a7/dist/authentication.js"></script>
There are some scopes that come by default when the user passes the authentication test.
- For accessing their Username use
id = "OneAuthUserName"
inside any HTML tag. E.g. - and for having their first name use
id = "OneAuthFirstName"
, e.g.
<p>Your username is: <span id="OneAuthUserName"></span></p>
<p>Your Name is: <span id="OneAuthFirstName"></span></p>
Resource credit: Developer Zone