based on the popular OAuth 2.0 protocol.
For the most recent stable version:
To get started, import the library within the <head>...</head> tags of your HTML.
Initiating The Login Dialogue
To initiate the LaunchKey login dialogue, your end users will click a LaunchKey login button. The button will
<!-- Paste this where you want your login button -->
</body> tag in your HTML. The Service
information you need can be found on your Service details page in your Dashboard.
// Options are 'small', 'medium', and 'large' - default is 'large'
// Options are 'mini', 'short', and 'full' - default is 'full'
// Options are 'blue', 'light', and 'dark' - default is 'blue'
// Options are 'en', 'fr', 'it', 'de' and 'es' - default is 'en'
// The redirect URL a user should be directed to upon return from LaunchKey after logging in.
// By default it will be the page sent from.
// This must match the URL specified for OAuth domain in your dashboard.
redirectUrl: location.protocol + '//' + location.host + window.location.pathname,
//The id of the LaunchKey button.
Init Object Attributes
|appKey:||number 10 digit unique ID found in Service details page in your dashboard
|size:||string [small, medium, large] The size of the rendered button
|length:||string [mini, short, full] The visual format of the button
|color:||string [blue, light, dark] Login button color theme
|lang:||string [en, fr, it, de, es] Login button language
|redirectUrl:||string Location user will be redirected to after login (default is current page)
|el:||Element The login button DOM Element object
Log Out The User
To logout the user, you should eliminate the cookies that were created after login. This can be done by calling
LaunchKey.logout() or by directing the user to the OAuth logout endpoint: https://oauth.launchkey.com/logout
true, window closes after signing out; default is
|redirect:||string URL at your domain where you'd like the user to be redirected back to after sign out
|access_token:||string The access token of the user to be logged out
|format:||string [JSON, HTML] Response format
Example Using Endpoint
LaunchKey links to user contributed code as a resource to its community. LaunchKey does not in any way
guarantee or warrant the quality and security of these code bases. User contributed code is supported by the
creators. If you do find a link from the site to user contributed code that is malicious or inappropriate in any
way, please report that link to LaunchKey immediately and we will investigate the claim. Submit any issue to
LaunchKey support at https://launchkey.com./support.