Filter results by

ARTIK Cloud Accounts

An application can register new ARTIK Cloud users using the following identity providers:

  • ARTIK Cloud Account
  • Samsung Account
  • Google Account
  • Naver Account

Accounts are linked by email address. An ARTIK Cloud Account and any other Account type using the same email address will have the same devices and applications.

Users are not "owned" by an application, but are users of the platform. The benefit of choosing ARTIK Cloud Account as the identity provider in your application is that the design of each form (e.g., signin and signup) can be customized using application-specific CSS.

For security purposes, ARTIK Cloud Accounts login forms are hosted on the ARTIK Cloud platform. Only web views are supported. This ensures that only ARTIK Cloud can access a user's credentials. Instead of accessing a user's password, the application uses a token that contains the permissions granted by the user.

After reviewing this documentation, you will be able to:

  • Customize a signup and signin experience when using ARTIK Cloud Account as the identity provider.
  • Make Accounts API calls. For each of the calls, we specify which identity providers the call is applicable to.

Check out the accompanying article Authentication to learn about OAuth2 features supported by ARTIK Cloud.

Sign Up

To sign up via ARTIK Cloud Account, the user needs to provide a full name, email, and password. The user will receive an email to activate their new ARTIK Cloud Account. Once activated, the user will be able to sign into ARTIK Cloud via your application.

HIPAA Compliance

If your application needs to meet HIPAA compliance, it must restrict user registration to ARTIK Cloud Accounts.

Form Customization

You have the ability to customize the forms hosted on the ARTIK Cloud platform. blank.css provided in the sample code gives an example of form customization.

Forms may be customized only if the application sign-up or sign-in uses the ARTIKCLOUD account type.

The following screenshots are examples of forms you can customize:

Example signup form Example signin form Example password recovery form

HTML Structure of Account Forms

To help you customize the pages, the forms follow a standard structure, shown below:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<html>
...
<body class="page-signin">
<div class="container">
    <div class="headers">
        <div class="heading-title">
            <h2 id="default-title">Sign In</h2>
            <h2 id="application-title"></h2>
        </div>
        <div class="heading-description">
            <div id="default-description"></div>
            <div id="application-description"></div>
        </div>
    </div>
    <div class="content">
        <div class="side-panel">
            <ul...>
            </ul>
        </div>
        <div class="account-form">
            [<div class="global alert alert-warning">...</div>]
            <form ... id="signin" class="account-form">
                [<div class="global alert alert-danger">...</div>]
                [<div class="flash-error alert alert-danger">...</div>]
                <div class="form-inputs">
                    <div class="form-group"></div>
                    ...
                </div>
                <div class="actions">
                    <... class="signin-action">...</...>
                    <... class="signup-action">...</...>
                    <... class="forgotpassword-action">...</...>
                    ...
                </div>
            </form>
        </div>
    </div>
    <div class="footer">
        [<div class="alert alert-info"><form ... id="resendActivationForm">...</form></div>]
        ...
    </div>
</div>
</body>
</html>

The following style changes can be made to the forms:

  • Add background image.
  • Modify fonts and colors for all forms.
  • Change button properties.
  • Customize messages for all forms, which include forgot passwords, reset password, sign-in and sign-up content.

Test the CSS

Building a CSS is an iterative task, and you should test your CSS interactively and locally before uploading it. To test your CSS, make the following change to any Accounts API calls that display a form: Append the query parameter test_css_blank and make the parameter equal to true.

This will cause forms to be rendered with an empty blank.css style. You may then add your own CSS locally. Then, use a browser extension or your browser's developer tools to view the changes. For example, in Chrome you can use:

  1. Live CSS Editor: This Chrome extension allows you to live-edit a CSS file that is added when rendering a URL locally.
  2. Chrome Developer tools: You can use the “Workspaces” in Chrome to override the blank.css file with your own local CSS file. Please refer to the Chrome Workspaces documentation for more information.

Upload the CSS

Since the form is hosted on the ARTIK Cloud platform, it must be submitted to our team. To submit your form, go to the Accounts CSS page for your application on the Developer Dashboard, paste or upload your CSS, and click "Save and Publish". The response time is within one business day.

ARTIK Cloud Developer Dashboard CSS upload

Accounts API reference

Endpoint

1
https://accounts.artik.cloud

See Redirect URL parameters for redirect URL query parameters and their possible values.

Sign up a user

GET /signup

Displays a signup form. Your application uses this call to create a new user account using ARTIK Cloud Accounts or Samsung Accounts.

Available URL query parameters

Parameter Description
client_id Application ID.
account_type (Optional) Account type. Can be ARTIKCLOUD or SAMSUNG (defaults to ARTIKCLOUD).
redirect_uri (Optional) Redirect URI. If not specified, user will be redirected to an ARTIK Cloud page stating that a validation email was sent.
state (Optional) Stores client application data, added to the URI upon redirection.
test_css_blank (Optional) Causes ARTIK Cloud form to be displayed with an empty blank.css (ARTIKCLOUD account only).

The following password limitations apply:

  • Minimum length - 8 characters
  • Maximum length - 64 characters
  • At least one uppercase
  • At least one lowercase
  • At least one numeric character
  • At least one special character (~!@#$%^&*():?<>+)

When signup is successful, the user is given this message:

1
2
3
Thank you for registering.

To activate your account, please click the link in the activation email sent to your email address.

When finished:

  • User is redirected to redirect_uri with status=login_request and origin=signup.

Email confirmation from ARTIK Cloud

If signup is successful, the following email is sent from noreply@artik.cloud:

1
2
3
4
5
6
7
8
9
10
11
Signin to <app>: activate your ARTIK Cloud account
 
Dear <name>,
 
You have successfully signed up to <app> using an ARTIK Cloud account.
 
To activate your account click on the link below
<link>
 
Thanks,
<App> and ARTIK Cloud Team

Example form

Example signup form

Resend activation to a user

POST /resendActivation

Resends the activation email to a user, if the user exists.

Available URL query parameters

Parameter Description
redirect_uri (Optional) Redirect URI. If not specified, uses redirect URI of the application.
client_id Application ID.
test_css_blank (Optional) Causes ARTIK Cloud form to be displayed with an empty blank.css (ARTIKCLOUD account only).

Request body parameters

Parameter Description
email User's email address.

When finished:

  • If no redirect_uri specified: User is redirected to an ARTIK Cloud page with success or error.
  • If redirect_uri specified: User is redirected to redirect_uri with status=login_request and origin=resendactivation. On error, include form error parameters.

Sign in a user

GET /signin GET /authorize

Displays a sign-in form that allows the user to sign in (with ARTIK Cloud Accounts or other identity providers) and return a user token to the application.

Using the /signin endpoint, the sign-in form is always displayed. Using the /authorize endpoint, if the user is already connected (using a session cookie), the sign-in form is skipped and the user is redirected to the OAuth2 flow.

Available URL query parameters

Parameter Description
client_id Application ID.
response_type OAuth2 response type. Can be code (Authorization Code method) or token (Implicit method).
account_type (Optional) Specify identity provider for login. Can be ARTIKCLOUD, SAMSUNG, GOOGLE or NAVER (defaults to ARTIKCLOUD). If not specified, UI displays all 4 options.
redirect_uri (Optional) Redirect URI. If not specified, uses redirect URI of the application.
state (Optional) Stores client application data, added to the URI upon redirection.
test_css_blank (Optional) Causes ARTIK Cloud form to be displayed with an empty blank.css (ARTIKCLOUD account only).

When finished:

  • If the user is connecting to the application for the first time, or if the application changed the permissions: The user is redirected to the grant permissions page, and the application is then redirected to the OAuth2 flow to receive a user token.
  • For subsequent connections: Application is redirected to the OAuth2 flow to receive a user token.
  • On error, redirect_uri includes OAuth 2 error parameter.

Example form

Example signin form

Reset a user's password

GET /forgotPassword

Displays a password reset form that allows a user to enter their email. If the user exists, an email is sent with a link to reset the user's password.

Available URL query parameters

Parameter Description
client_id Application ID.
redirect_uri (Optional) Redirect URI. If not specified, uses redirect URI of the application.
test_css_blank (Optional) Causes ARTIK Cloud form to be displayed with an empty blank.css (ARTIKCLOUD account only).

When finished:

  • User is redirected to redirect_uri with origin=forgotpassword.

Example form

Example password reset form

Change a user's email

GET /changeEmail

Displays a form that allows a user to change the email address associated with their account.

Available URL query parameters

Parameter Description
client_id Application ID.
redirect_uri (Optional) Redirect URI. If not specified, uses redirect URI of the application.
state (Optional) Stores client application data, added to the URI upon redirection.
test_css_blank (Optional) Causes ARTIK Cloud form to be displayed with an empty blank.css (ARTIKCLOUD account only).

When finished:

  • User is redirected to redirect_uri with origin=changeemail.

Change a user's password

GET /changePassword

Displays a form that allows a user to change the password for their account.

Available URL query parameters

Parameter Description
client_id Application ID.
redirect_uri (Optional) Redirect URI. If not specified, uses redirect URI of the application.
state (Optional) Stores client application data, added to the URI upon redirection.
test_css_blank (Optional) Causes ARTIK Cloud form to be displayed with an empty blank.css (ARTIKCLOUD account only).

When finished:

  • User is redirected to redirect_uri with origin=changepassword.

Example form

Example password change form

Sign out a user

POST /signout

Signs out a user from the current session (ARTIK Cloud, Samsung, Google, or Naver).

Available URL query parameters

Parameter Description
redirect_uri Redirect URI. If not specified, uses redirect URI of the application.
state (Optional) A value (must be URL-safe) passed back to you when the flow is finished. Useful for keeping a state.

When finished:

  • User is redirected to redirect_uri with status=logout and origin=signout.

Redirect URL parameters

This section lists query parameters that could be appended to the Redirect URI when ARTIK Cloud redirects the browser to the specified redirect_uri.

  Query Parameters Description Possible Values
  status Defines what the application should display after the request Signup, Resend Activation: login_request
Display a sign-in form for user to validate their account and return a user token to the application

Signout: logout
After signout is finished and user has been logged out
  origin Indicates which initial request redirected the user to the redirect URL

Exception: Signin does not return an origin because it follows the OAuth2 standard, which has no origin parameter
Signup: signup

Reset Password: forgotpassword

Resend Activation: resendactivation

Change Email: changeemail

Change Password: changepassword

Signout: signout
Standard OAuth2 error OAuth2 standard errors (see RFC-6749) Signin: unauthorized_client, invalid_request, access_denied, server_error
" code OAuth2 standard code Signin: Code to be exchanged with user token during OAuth2 flow
" state State forwarded during OAuth2 flow Signin: state sent in request
Form Errors error_code Form error Resend Activation: 400
" error_msg_<br>email Form error Resend Activation:
"Maximum length is 255", "This field is required", "Valid email required"
" error_msg_<br>client_id Form error Resend Activation:
"Maximum length is 255"

Sample Code

Sample code demonstrating the above features in a Node.js application is available on GitHub. Follow the instructions in README.md to install the application.

The web application demonstrates how to sign in/sign up/sign out a user and reset the user's password with and without an iframe. In addition, blank.css demonstrates how to customize the forms when using ARTIK Cloud Account as the identity provider.