diff options
author | 2021-02-13 00:26:45 +0300 | |
---|---|---|
committer | 2021-02-13 01:16:31 +0300 | |
commit | 0309638909fe5b107366ff8e288ca25352221677 (patch) | |
tree | 0e111b7fbdefbf43d5edcbcb22df1f21b19871b6 /src/pages/CallbackPage.tsx | |
parent | Merge pull request #133 from python-discord/github-annotations-eslint (diff) |
Adds Basic Auth Functionality
Moves all authorization functionality to a new file, and adds a helper
to send discord OAuth code to the backend, and set JWT. Adds a library
to read and set cookies.
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'src/pages/CallbackPage.tsx')
-rw-r--r-- | src/pages/CallbackPage.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pages/CallbackPage.tsx b/src/pages/CallbackPage.tsx index fab2086..00feb76 100644 --- a/src/pages/CallbackPage.tsx +++ b/src/pages/CallbackPage.tsx @@ -7,11 +7,12 @@ export default function CallbackPage(): JSX.Element { const params = new URLSearchParams(location.search); const code = params.get("code"); + const state = params.get("state"); if (!hasSent) { setHasSent(true); - window.opener.postMessage(code); + window.opener.postMessage({code: code, state: state}); } - return <p>Code is {code}</p>; + return <div/>; } |