Skip to content

[Keycloak] TypeError: fetch failed #11915

Answered by JHansen2000
JHansen2000 asked this question in Help
Discussion options

You must be logged in to vote

@billgloff I was able to get my setup working, notes below:

  1. This fetch failed error seems to be a catch-all for a large variety of errors. I received the same error for issues stemming from both Keycloak misconfiguration and NextAuth failures.
  2. Do not trust NextAuth to infer or identify your environment variables automatically. Despite the documentation, when I rebuilt the library from source and debugged it I found that it was sometimes failing to find some of my environment variables, so defining them in the auth.ts helped a lot.
  3. Here are the environment variables I needed for my implementation:
# Keycloak Variables
AUTH_KEYCLOAK_ID=<Keycloak Client ID>
AUTH_KEYCLOAK_SECRET=<Keycloak C…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@balazsorban44
Comment options

@JHansen2000
Comment options

@billgloff
Comment options

@JHansen2000
Comment options

Answer selected by JHansen2000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
bug Something isn't working providers triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
3 participants
Converted from issue

This discussion was converted from issue #11914 on September 26, 2024 22:00.