This section goes over authentication. You will be using this app to power the authentication for all your apps.
To test these out, simply open your console and try them out the functions
Your SDK should provide the following:
Developers should be able to easily add the JavaScript from your website.
<script src="https://js5.c0d3.com/auth.js"></script>
Auth.signup({ username: 'songz', email: 'song@zheng.club', password: 'helpless', name: 'aouo oauu', age: 942, ... any key / value pairs you like ... })
Auth.login({ username: 'songz', password: 'helpless', })
Auth.getSession().then( user => { console.log('User is', user) })
// Logout, then get session should be empty Auth.logout().then( user => { return Auth.getSession() }).then(console.log)
Server should power all of the above functions using sessions
Allow authentication via JWT tokens