This Node.js sample application is a small web server. It demonstrates how to use ARTIK Cloud Accounts to sign in/sign up/sign out a user and reset the user's password.
For more information on this feature, go to our documentation page: https://developer.artik.cloud/documentation/introduction/accounts.html
- Node v12+
- Execute the command to install node modules
npm install
- Configure your application in the Developer Dashboard as following:
- Set "Redirect URL" to “http://localhost:4444/redirect”.
- Under "PERMISSIONS", set "Profile" to "Read". You should also set it to "Write" if you want the application to modify the user's profile.
- Set config.json:
- clientId: your application ID (client ID)
- clientSecret: your application Client Secret
- authUrl: ARTIK Cloud Accounts API url (https://accounts.artik.cloud)
- apiUrl: ARTIK Cloud REST API url (https://api.artik.cloud/v1.1)
- host: your server hostname (localhost)
- port: your server port (4444)
- log: log configuration
- testCSS: true, to set Form CSS in test mode. false, to use approved CSS (or default CSS if no CSS approved yet)
- Run the command in the terminal:
node index.js config.json
- In your browser, load http://localhost:4444
- '/' -> link to sign in, connect to Samsung and sign up
- '/signin' -> example of iframe usage with account form
- in sign in form, you can test the link to forgot password
If you are not familiar with ARTIK Cloud, we have extensive documentation at https://developer.artik.cloud/documentation
The full ARTIK Cloud API specification can be found at https://developer.artik.cloud/documentation/api-reference/
Peek into advanced sample applications at https://developer.artik.cloud/documentation/samples/
To create and manage your services and devices on ARTIK Cloud, visit the Developer Dashboard at https://developer.artik.cloud
Licensed under the Apache License. See LICENSE.
Copyright (c) 2016 Samsung Electronics Co., Ltd.