Skip to content
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

restore login #63

Merged
merged 6 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 27 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,30 +103,39 @@ yarn upgrade @scientist-softserv/webstore-component-library --latest
Using the local github repository requires you to manually clone the component library to your computer, build, and link it:

#### Preparing your local copy of the component library:
_Prerequisite: clone the [webstore-component-library](https://github.com/scientist-softserv/webstore-component-library.git) and [get the app running](https://github.com/scientist-softserv/webstore-component-library#running-the-app)_

cd webstore-component-library
yarn link # now there is a magic symlink in `~/.config/yarn/link` usable by the webstore app
_Prerequisite: clone the [webstore-component-library](https://github.com/scientist-softserv/webstore-component-library.git) (wcl) and [get the app running](https://github.com/scientist-softserv/webstore-component-library#running-the-app)_
``` bash
cd webstore-component-library
yarn link # now there is a magic symlink in `~/.config/yarn/link` usable by the webstore app
```

Choose one of the below:

npm run build-lib # must be run every time you want a change to show in the webstore
npm run watch-lib # run once and the wcl will watch for changes
``` bash
npm run build-lib # must be run every time you want a change to show in the webstore
npm run watch-lib # run once and the wcl will watch for changes
```

#### Preparing your local copy of the webstore:

# run in a separate terminal window than where the wcl is
cd webstore
yarn link "@scientist-softserv/webstore-component-library"
yarn remove @scientist-softserv/webstore-component-library
(restart the dev server)
``` bash
# run in a separate terminal window than where the wcl is

cd webstore
yarn link "@scientist-softserv/webstore-component-library"
yarn add react-bootstrap@<version-number> # e.g. yarn add [email protected]
# use the version listed in the dependencies of "@scientist-softserv/webstore-component-library" in the "yarn.lock" file.
yarn remove @scientist-softserv/webstore-component-library
(restart the dev server)
```

#### Return to using the packaged version of the webstore-component-library:
# in the webstore repository
yarn unlink "@scientist-softserv/webstore-component-library"
git checkout package.json yarn.lock
yarn install --check-files --force
(restart the dev server)
``` bash
# in the webstore repository

yarn unlink "@scientist-softserv/webstore-component-library"
git checkout package.json yarn.lock
yarn install --check-files --force
(restart the dev server)
```

## Exception Handling
The application is configured to use Sentry. Refer to ".env.development.example" for how to find the necessary variables.
Expand Down
5 changes: 4 additions & 1 deletion utils/api/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ export const fetcher = (url, token) => {
.then(res => res.data)
.catch(error => {
Sentry.captureException(error)
throw error
// the `signIn` function from "next-auth/react" uses `fetcher` and returns a 404 error response. throwing that error causes an
// `OAUTH_CALLBACK_HANDLER_ERROR`, which prevents users from signing in. `signIn` doesn't pass a url to `fetcher`. the check below
// ensures that other errors still get thrown
if (error.config.url !== null) throw error
})
}

Expand Down
Loading