Skip to content

Commit

Permalink
microsoft login
Browse files Browse the repository at this point in the history
  • Loading branch information
juthikahoque committed Feb 12, 2023
1 parent de9a422 commit 4181f3e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"react-google-login": "^5.2.2",
"react-json-schema": "^1.2.2",
"react-jsonschema-form": "^1.8.1",
"react-microsoft-login": "^1.15.0",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.2",
"react-table": "^7.7.0",
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/components/auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
GoogleLoginResponseOffline,
} from "react-google-login";

import MicrosoftLogin from "react-microsoft-login";
import authAPIClient from "../../APIClients/AuthAPIClient";
import { HOME_PAGE, SIGNUP_PAGE } from "../../constants/Routes";
import AuthContext from "../../contexts/AuthContext";
Expand Down Expand Up @@ -89,6 +90,13 @@ const Login = (): React.ReactElement => {
window.alert(JSON.stringify(error))
}
/>
<MicrosoftLogin
clientId="1cecce6a-6a74-4a50-bb01-2735e34e16e2"
authCallback={(error) => {
// eslint-disable-next-line no-alert
window.alert(JSON.stringify(error));
}}
/>
</form>
<div>
<button
Expand Down
16 changes: 15 additions & 1 deletion frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8012,6 +8012,13 @@ ms@^2.1.1:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==

msal@^1.3.2:
version "1.4.17"
resolved "https://registry.yarnpkg.com/msal/-/msal-1.4.17.tgz#b78171c0471ede506eeaabc86343f8f4e2d01634"
integrity sha512-RjHwP2cCIWQ9iUIk1SziUMb9+jj5mC4OqG2w16E5yig8jySi/TwiFvKlwcjNrPsndph0HtgCtbENnk5julf3yQ==
dependencies:
tslib "^1.9.3"

multicast-dns-service-types@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901"
Expand Down Expand Up @@ -9854,6 +9861,13 @@ react-lifecycles-compat@^3.0.4:
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==

react-microsoft-login@^1.15.0:
version "1.15.0"
resolved "https://registry.yarnpkg.com/react-microsoft-login/-/react-microsoft-login-1.15.0.tgz#0ebfb45685392371aa06d475d861f4a494d744d8"
integrity sha512-/yLNjhgYTLgk7azHfPZMiAp+A9V8fUQNYNQgOraww/rsvgMfUL82KjCbMIXGBkaWIPnLvZ2grCzc571TxMomXg==
dependencies:
msal "^1.3.2"

react-overlays@^5.0.0:
version "5.0.1"
resolved "https://registry.yarnpkg.com/react-overlays/-/react-overlays-5.0.1.tgz#7e2c3cd3c0538048b0b7451d203b1289c561b7f2"
Expand Down Expand Up @@ -11563,7 +11577,7 @@ tsconfig-paths@^3.9.0:
minimist "^1.2.0"
strip-bom "^3.0.0"

tslib@^1.10.0, tslib@^1.8.1:
tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.3:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
Expand Down

0 comments on commit 4181f3e

Please sign in to comment.