Directly redirect to github signin page, without going to auth0 login page (@auth0/nextjs-auth0)

I am using auth0 with next js. I followed all the steps provided in this article to set it up:

Introducing Auth0’s Next.js SDK

It works fine and all but I want to automatically redirect them to GitHub, instead of showing the auth0 page as well, as I’m only using Github OAuth for my project, therefore making the auth0 page a redundancy.

This post - How to skip aut0 login page and directly redirect in to social login site? - Auth0 Community - mentioned a similar thing, but as far as I know, it uses the javascript SDK whereas I’m using the next-js one, could someone tell me how to implement the same thing but in my use-case? thanks!

I had the same issue in my NextJS APP using Approuter, i needed to skip the Universal login Page and go directly to github login page (the only IDP enabled in my app) and here is the implementation :

app/api/[auth0]/route.ts :

import { handleAuth, handleLogin } from "@auth0/nextjs-auth0";

export const GET = handleAuth({
  login: handleLogin({
    // Get the connection name from the Auth0 Dashboard
    authorizationParams: { connection: "github" },
  }),
});