title: Stuck with Next Auth authorize part. Error: Action api with HTTP GET is not supported by NextAuth.js
body: <p>I'm getting a strange error for the past few days. Unable to authenticate my Next.js app with credentials.</p>
  <p>As far as I know everything is correct according to the doc.</p>
  <p>I'm also unable to see a network request in my chrome dev tools.</p>
  <pre><code>import NextAuth from &quot;next-auth&quot;;
  import CredentialProvider from &quot;next-auth/providers/credentials&quot;;
  import { signOut,useSession,signIn } from 'next-auth/react';
  import { axios } from 'axios';
  import { API_URL } from &quot;../../../helpers/api/mutations&quot;;
  
  export default NextAuth({
    providers: [
      CredentialProvider({
        name: &quot;credentials&quot;,
        credentials: {
          username: {
            label: &quot;Email&quot;,
            type: &quot;text&quot;,
            placeholder: &quot;mani@test.com&quot;
          },
          password: {
            label: &quot;Password&quot;,
            type: &quot;password&quot;
          }},
          // My authorize function where I called my graphql mutation for token and session.
          async authorize(credentials,req) {
              const {data} = await axios({
                url: API_URL,
                method: 'post',
                data: {
                 query: `mutation {
                  login(
                     mobileNumber: &quot;4738291046&quot;,
                    mobileCountryCode: &quot;00&quot;,
                    password: &quot;admin123&quot;
                  ) {
                    expiresAt
                    accessToken
                  }
                }`
                }
               })
                .then(res =&gt; {
                 console.log(res.data);
                })
                .catch(err =&gt; {
                 console.log(err.message);
                });
  
                if (data) {
                  console.log(data,'dataaa');
                  return data
                }
                else {
                  return null
                }
          }
      }),
    ],
    callbacks: {
      jwt: ({ token, user }) =&gt; {
        // first time jwt callback is run, user object is available
        if (user) {
          token.id = user.id;
        }
  
        return token;
      },
      session: ({ session, token }) =&gt; {
        if (token) {
          session.id = token.id;
        }
  
        return session;
      },
    },
     secret: &quot;test&quot;,
     jwt: {
         secret:&quot;test&quot;,
         encryption: true,
     },
     pages: {
      signIn: &quot;api/auth/sigin&quot;,
    },
  });
  </code></pre>