Getting next-auth-steam to work

I need some help getting steam auth to work with next. I am getting an Error: This action with HTTP GET is not supported by NextAuth.js (See attached image) This is my app/auth/[...nextauth]/route.js file:
import SteamProvider from 'next-auth-steam'
import NextAuth from 'next-auth/next'
import { ray } from 'node-ray';

async function handler(req,res) {
return NextAuth(req, res, {
providers: [
SteamProvider(req, {
clientSecret: process.env.STEAM_API_KEY,
callbackUrl: process.env.NEXTAUTH_URL + '/api/auth/callback',
}),
]
});
}

export {
handler as GET,
handler as POST,
}
import SteamProvider from 'next-auth-steam'
import NextAuth from 'next-auth/next'
import { ray } from 'node-ray';

async function handler(req,res) {
return NextAuth(req, res, {
providers: [
SteamProvider(req, {
clientSecret: process.env.STEAM_API_KEY,
callbackUrl: process.env.NEXTAUTH_URL + '/api/auth/callback',
}),
]
});
}

export {
handler as GET,
handler as POST,
}
Anyone else run into this? Am I doing something wrong? Any help would be greatly appreciated. Also these are my package versions:
"next": "^13.3.0",
"next-auth": "^4.22.0",
"next-auth-steam": "^0.1.5",
"next": "^13.3.0",
"next-auth": "^4.22.0",
"next-auth-steam": "^0.1.5",
No description
Solution:
The reason why this was not working is because I had this in my page.js
<Link href="/api/auth/steam" className="text-blue-400 hover:text-blue-200 font-semibold underline text-lg mt-6">Log in</Link>
<Link href="/api/auth/steam" className="text-blue-400 hover:text-blue-200 font-semibold underline text-lg mt-6">Log in</Link>
How you actually get it working is by actually following the example here:...
GitHub
next-auth-steam/examples/app-router/app/page.tsx at master · Nekony...
steam authentication provider for next-auth. Contribute to Nekonyx/next-auth-steam development by creating an account on GitHub.
GitHub
next-auth-steam/examples/app-router/app/Sign.tsx at master · Nekony...
steam authentication provider for next-auth. Contribute to Nekonyx/next-auth-steam development by creating an account on GitHub.
Jump to solution
1 Reply
Solution
Lobster
Lobster13mo ago
The reason why this was not working is because I had this in my page.js
<Link href="/api/auth/steam" className="text-blue-400 hover:text-blue-200 font-semibold underline text-lg mt-6">Log in</Link>
<Link href="/api/auth/steam" className="text-blue-400 hover:text-blue-200 font-semibold underline text-lg mt-6">Log in</Link>
How you actually get it working is by actually following the example here: https://github.com/Nekonyx/next-auth-steam/blob/master/examples/app-router/app/page.tsx By using this file: https://github.com/Nekonyx/next-auth-steam/blob/master/examples/app-router/app/Sign.tsx
GitHub
next-auth-steam/examples/app-router/app/page.tsx at master · Nekony...
steam authentication provider for next-auth. Contribute to Nekonyx/next-auth-steam development by creating an account on GitHub.
GitHub
next-auth-steam/examples/app-router/app/Sign.tsx at master · Nekony...
steam authentication provider for next-auth. Contribute to Nekonyx/next-auth-steam development by creating an account on GitHub.
Want results from more Discord servers?
Add your server