AuthSdkError: The "codeVerifier" (generated and saved by your app) must be passed to /token

I use GitHub - okta/okta-auth-js: The official js wrapper around Okta's auth API
I get this error while trying to set tokens using below code

AuthSdkError: The “codeVerifier” (generated and saved by your app) must be passed to /token

My Config

  issuer: `****`,
  clientId: '******',
  redirectUri: 'http://localhost:3000/authentication/callback',
  scopes: ['openid', 'profile', 'email'],
  postLogoutRedirectUri: 'http://localhost:3000/login',
  tokenManager: {
    autoRenew: false,

My authenticate method

try {
      const transaction = await authClient.signInWithCredentials({
        username: '',
        password: '*********',

      if (transaction?.status === 'SUCCESS') {
            responseType: 'code',
            pkce: false,
            sessionToken: transaction.sessionToken,
            scopes: ['openid', 'email', 'profile'],
          .then(function (res) {
            const tokens = res.tokens

            // Do something with tokens, such as
          .catch(function (err) {
    } catch (error: any) {

It sets a valid okta session but it throws the above error I mentioned initially. I got confirmation from below code.

authClient.session.exists().then(async function (exists) {
    if (exists) {
      console.log('logged in')
    } else {
      console.log('not logged in')

Also once I use authClient.signOut() once the session is set, it sign out the user from okta session. But not from my udemy sso session.

I would like to know something I am doing wrong. Thanks in advance.