-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logging out of Gitlab and clearing session storage #793
Logging out of Gitlab and clearing session storage #793
Conversation
import { signOut } from 'util/auth/Authentication'; | ||
import { useAuth } from 'react-oidc-context'; | ||
|
||
jest.mock('react-oidc-context'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@atomicgamedeveloper thanks for the update. I see an error with the following command. $yarn clean install
$yarn build
yarn run v1.22.22
warning ../../../../../package.json: No license field
$ npx react-scripts build
/home/dtaas/.npm/_npx/cd53aabf71f3f793/node_modules/resolve/lib/sync.js:113
throw err;
^
Error: Cannot find module 'typescript' from '/home/dtaas/Documents/git/into-cps/DTaaS/client/node_modules'
at Function.resolveSync [as sync] (/home/dtaas/.npm/_npx/cd53aabf71f3f793/node_modules/resolve/lib/sync.js:111:15)
at getModules (/home/dtaas/.npm/_npx/cd53aabf71f3f793/node_modules/react-scripts/config/modules.js:119:32)
at Object.<anonymous> (/home/dtaas/.npm/_npx/cd53aabf71f3f793/node_modules/react-scripts/config/modules.js:142:18)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Module.require (node:internal/modules/cjs/loader:1231:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/home/dtaas/.npm/_npx/cd53aabf71f3f793/node_modules/react-scripts/config/webpack.config.js:28:17) {
code: 'MODULE_NOT_FOUND'
}
Node.js v20.12.2
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. This is an error due to outdated dependencies. We need to resolve this error before the code can be build. Do you know a fix? Thanks. |
My nodejs stack is $yarn -v
1.22.22
$node -v
v20.12.2
$npm -v
10.5.0 |
Mine is: I can try downgrading node and npm and remaking it from there. |
@atomicgamedeveloper I am not able to replicate the logout functionality. What I've tried: yarn install Accessed the app at localhost:4000 and logged in using gitlab.com credentials. I've also tried with self-hosted gitlab solution. I am not able to logout in both cases. PS: I am yet to test the server side logout |
@atomicgamedeveloper please also rebase your branch with the latest commit on |
I've also checked with docker compose combination in |
@prasadtalasila The PR is ready for review, thank you. I have also looked into how long fetch could potentially run for in the current implementation: By default, Fetch API has no timeout set so the request may hang forever, but the AbortSignal.timeout() API provides an easy way to implement it. |
@atomicgamedeveloper please use AbortSignal with a timeout of 30 seconds. |
@atomicgamedeveloper please rebase to the latest commit on |
…gamedeveloper/DTaaS into 479-proper-gitlab-log-out
Code Climate has analyzed commit 5402b78 and detected 0 issues on this pull request. View more on Code Climate. |
d83f95a
into
INTO-CPS-Association:feature/distributed-demo
Continuing off of commit ddab8e9 of pull request #681, this PR aims to fix issue #654 and #479. This commit fixes an invalid hook call in the
MenuToolbar
component by passing itsAuthContextProps
object to thesignOut
function. This keeps the hook call top-level as per the rules of hooks.