Intastellar Sign-in: JavaScript Documentation

Required data attribute parameters

Parameters
client_id Required

The client ID for your application. You can find this value in the API Console Credentials page.

login_callback Required

A function name where the token is passed down to.

login-uri Required

A link where the token is appended to via query string "token="

* Note you can only define login-uri or login_callback not both.

app-name The name of your Website or application.

Get started!

To get started copy the script below and add into the <head> section of your Website.

    
    <script src="https://account.api.intastellarsolutions.com/insign/client.js"></script>

    
    

Display the login button on your website

    
    <div id="loginButton" data-client_id="" data-app-name="Example App" data-login_callback="login"></div>    
    <script>
        Intastellar.accounts.id.render("loginButton");
    </script>
    
    

Create an API key

After you´ve added the client script you need to add an API key for authentication and implementation.

Customize

You can at any point change the style of the login button from light to dark.

        
        <script>
            Intastellar.accounts.id.render("loginButton", {
                "theme": "dark",
                "picker": "button | popup"
            });
        </script>
        
        

Required parameters

Parameters
scope Required

A space-delimited list of scopes that identify the resources that your application could access on the user's behalf. These values inform the consent screen that Google displays to the user.

Scopes enable your application to only request access to the resources that it needs while also enabling users to control the amount of access that they grant to your application. Thus, there is an inverse relationship between the number of scopes requested and the likelihood of obtaining user consent.

We recommend that your application request access to authorization scopes in context whenever possible. By requesting access to user data in context, via incremental authorization, you help users to more easily understand why your application needs the access it is requesting.

theme Define if the button should be white or dark
picker Choose between button or popup style.

Define your scope

To request more infos besides the public data, you can define in the scope the information you want to request.

Currently there are only two extra infos you can request.

Default: profile

  • phone
  • birthday
        
        <script>
            Intastellar.accounts.id.render("loginButton", {
                "scopes": [
                    "phone",
                    "birthday",
                ]
            });
        </script>
        
        

Sign out user

Sign out the user from the website.

        
        <script>
            Intastellar.accounts.id.signout();
        </script>