Skip to content

invalid_client error #76

Discussion options

You must be logged in to vote

Hello @jaffarhussain1011, welcome to Fief 👋

I'm not really familiar with the launchWebAuthFlow API but I think I understand why you get this.

Your Fief client is public, hence, we don't need to use the client secret at all. However, for security reasons, we enforce the use of PKCE in this case (https://docs.fief.dev/getting-started/clients/#public-clients). This is something that's handled automatically in our browser integration, but not in the base client.

Let's try something like this:

import { Fief, crypto } from "@fief/fief";

const getAuthURLWithPKCE = async (redirectUrl) => {
  // Fief helpers to generate a crypto challenge for PKCE
  const codeVerifier = await crypto.generateCodeV…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jaffarhussain1011
Comment options

Answer selected by jaffarhussain1011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants