{"id":19720767,"url":"https://github.com/ngthucdotcom/sign-in-popup-flow","last_synced_at":"2025-02-27T17:49:22.826Z","repository":{"id":101853312,"uuid":"582397950","full_name":"ngthucdotcom/sign-in-popup-flow","owner":"ngthucdotcom","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-26T19:45:17.000Z","size":112,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-10T16:13:51.969Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ngthucdotcom.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":"2022-12-26T17:44:47.000Z","updated_at":"2023-01-09T10:36:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"ad477f16-a859-4b62-9afa-915695546dca","html_url":"https://github.com/ngthucdotcom/sign-in-popup-flow","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngthucdotcom%2Fsign-in-popup-flow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngthucdotcom%2Fsign-in-popup-flow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngthucdotcom%2Fsign-in-popup-flow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngthucdotcom%2Fsign-in-popup-flow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngthucdotcom","download_url":"https://codeload.github.com/ngthucdotcom/sign-in-popup-flow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241040805,"owners_count":19898936,"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":[],"created_at":"2024-11-11T23:12:27.667Z","updated_at":"2025-02-27T17:49:22.807Z","avatar_url":"https://github.com/ngthucdotcom.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sign in with popup flow\n\n## Installation\n\n```bash\nnpm run install-server\nnpm run install-client\n```\n\n## Running\n\n```bash\nnpm run start-server\nnpm run start-client\n```\n\n## Flow\n\n* Step 1: User click on the button \"Sign in with Azure AD\"\n\n* Step 2: The client app initialize environment, and call `login` function from `libs/auth-lib.js`\n\n* Step 3: On then `auth-lib.js`, a function `login` is called. It build the url of the auth host, and open a popup\n  window with the url.\n\n* Step 4: The popup window is opened on client side, and the user will input his/her credentials to sign in.\n\n* Step 5: After the user sign in, auth host will validate the app registration, user credentials, and create a token for\n  the client app with user's information. Then, the auth host will redirect the popup window to the client app with the\n  token.\n\n* Step 6: The `auth-lib.js` will listen to the event from the popup window, process some logic to get the token, and\n  close the popup window.\n\n* Step 7: The client app will receive the token from the `auth-lib.js`, and store it in the local storage. If have any\n  problem, the client app will show the error message.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngthucdotcom%2Fsign-in-popup-flow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngthucdotcom%2Fsign-in-popup-flow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngthucdotcom%2Fsign-in-popup-flow/lists"}