import { NextApiRequest , NextApiResponse } from "next" ; import { AuthRouteHandlerOptions } from "." ; export function createTokenContent ( options ) { return async ( req , res ) => { const auth = options . getServerSideAuth ( req ) ; res . status ( 200 ) . json ( auth ? { data : auth } : { data : null } ) ; } ; }