{"id":18611103,"url":"https://github.com/loginradius/javascript-sdk","last_synced_at":"2025-11-02T21:30:32.962Z","repository":{"id":129070419,"uuid":"391954724","full_name":"LoginRadius/javascript-sdk","owner":"LoginRadius","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-08T09:47:18.000Z","size":83,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-12-27T01:42:45.604Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LoginRadius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-02T13:13:18.000Z","updated_at":"2021-10-27T11:32:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"c10e9edb-df35-4965-b68f-cb58a06aba98","html_url":"https://github.com/LoginRadius/javascript-sdk","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoginRadius%2Fjavascript-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoginRadius%2Fjavascript-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoginRadius%2Fjavascript-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoginRadius%2Fjavascript-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LoginRadius","download_url":"https://codeload.github.com/LoginRadius/javascript-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239400721,"owners_count":19632075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest"],"created_at":"2024-11-07T03:12:41.408Z","updated_at":"2025-11-02T21:30:32.913Z","avatar_url":"https://github.com/LoginRadius.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JavaScript SDK \n\n![Home Image](https://docs.lrcontent.com/resources/github/banner-1544x500.png)\n\nIntroduction\n=====\n\nCustomer Identity public repo for the LoginRadius JS SDK, based on LoginRadius V2 APIs.\n\nLoginRadius is an Identity Management Platform that simplifies user registration while securing data. LoginRadius Platform simplifies and secures your user registration process, increases conversion with Social Login that combines 30 major social platforms, and offers a full solution with Traditional User Registration. You can gather a wealth of user profile data from Social Login or Traditional User Registration.\n\nLoginRadius centralizes it all in one place, making it easy to manage and access. Easily integrate LoginRadius with all of your third-party applications, like MailChimp, Google Analytics, Livefyre and many more, making it easy to utilize the data you are capturing.\n\nLoginRadius helps businesses boost user engagement on their web/mobile platform, manage online identities, utilize social media for marketing, capture accurate consumer data, and get unique social insight into their customer base.\n\nPlease visit [here](http://www.loginradius.com/) for more information.\n\n\u003eDisclaimer\u003cbr\u003e\n\u003eThis library is meant to help you with a quick implementation of the LoginRadius platform and also to serve as a reference point for the LoginRadius API. Keep in mind that it is an open source library, which means you are free to download and customize the library functions based on your specific application needs.\n\n## Installation\nIn order to utilize the LoginRadius JS SDK, you will need to initialize the SDK with the following configurations:\n\n```\nimport initializeSDKClient from './LoginRadius_JS_SDK.js'\n\n    LoginRadiusSDK = new initializeSDKClient({\n      appName: {{Required | YOUR App Name}},\n      apiKey: {{Required | YOUR API KEY}},\n      customDomain: {{Optional | custom domain name, default is hub.loginradius.com}}\n      apiDomain: {{Optional | Api endpoint , default is https://api.loginradius.com}}\n      debugMode: {{Optional| true/false}}\n\n    });\n```\n\nReplace the placeholders with your LoginRadius credentials **apikey**, **appName**. These can be obtained from [here](https://www.loginradius.com/docs/api/v2/admin-console/platform-security/api-key-and-secret).\n\nPass **customDomain** and **apiDomain** if you have these enabled for your app. \n\nWhile in developement you can enable the **debugMode** to debug in browser developer console. \n\n## Getting Started\n\nThis document contains the information of methods supported by LoginRadius Javascript SDK.\n\n### openLoginPage()\n\nThis method redirects the user to the LoginRadius IDX page. \n\n```\nLoginRadiusSDK.openLoginPage({\n        redirect_uri: window.location.href\n    });\n```\n\n### appCallback()\n\nThis method fetches the token from query string and store it in browser storage\n\n```\nLoginRadiusSDK.appCallback()\n```\n\n### isLoggedIn()\n\nThis method checks whether the user is logged in or not, and returns a boolean value\n\n```\nLoginRadiusSDK.isLoggedIn()\n```\n\n### logout()\n\nThis method triggers logout action\n\n```\nLoginRadiusSDK.logout({\n        returnTo: window.location.href\n    });\n```\n\nHere returnTo is the return url, where the user will be redirected after successful logout.\n\n### openRegisterPage()\n\nThis method triggers registration action and redirects to the LoginRadius IDX registration section.\n\n```\n LoginRadiusSDK.openRegisterPage({\n        redirect_uri: window.location.href\n    });\n```\n\nHere redirect_uri is the return url, where the user will be redirected after a successful registration.\n\n### profileUpdate()\n\nThis method redirects to LoginRadius IDX profile.aspx page.\n\n```\nLoginRadiusSDK.profileUpdate();\n```\n\n### forgotPassword()\n\nThis method triggers forgot password action and redirects to LoginRadius IDX forgot password section \n\n```\nLoginRadiusSDK.forgotPassword({\n        redirect_uri: window.location.href\n    });\n```\n\nHere redirect_uri  is the return url, where the user will be redirected after forgot password action.\n\n### getToken()\n\nThis method gets access token from the browser's local storage\n\n```\nLoginRadiusSDK.getToken();\n```\n\n### getUserProfile()\n\nThis method fetches the profile based on the access token.\n\n```\nLoginRadiusSDK.getUserProfile();\n```\n\nFor details around LoginRadius Identity Experience Framework (IDX) and its customization please refer [here](https://www.loginradius.com/docs/libraries/identity-experience-framework/overview/#identity-experience-framework).\n\nDemo\n=====\n1. Navigate to ```demo``` repository\n2. Open the option.js file\n3. In the options.js file, Initialize the demo with your API Key, App Name.\n4. Open index.html file in browser and demo will appear.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floginradius%2Fjavascript-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floginradius%2Fjavascript-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floginradius%2Fjavascript-sdk/lists"}