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

fix: prevent crashes by filtering out null auth providers #1371

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ewan-escience
Copy link
Collaborator

Prevent crashes when auth provider down

Changes proposed in this pull request

  • Do an extra null check to prevent crashes when an auth provider is down

How to test

  • Have LinkedIn auth properly setup in your .env
  • Simulate LinkedIn being down by adding 120.0.0.1 www.linkedin.com to /etc/hosts
  • docker compose down --volumes && docker compose build --parallel && docker compose up --scale data-generation=0
  • Visit http://localhost/, because of the line in /etc/hosts, wait 10 seconds
  • Click on Sign in, the LinkedIn option should not be there
  • Remove the line from /etc/hosts
  • Restart the RSD and refresh the page
  • LinkedIn should be back as a signing in option
  • (Optional): try this out with other auth providers as well

Note: In order to get this fix out, I skipped the "greying out" part I suggested in #1367.

Closes #1367

PR Checklist:

  • Increase version numbers in docker-compose.yml
  • Link to a GitHub issue
  • Update documentation
  • Tests

@ewan-escience ewan-escience self-assigned this Jan 16, 2025
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RSD crashes when one of the auth provider's metadata cannot be fetched
1 participant