Nekonyx/next-auth-steam

button customization

kkagill opened this issue · 3 comments

Thanks a lot for this awesome library! I have two questions.

  1. Can this button be customized?
    image

  2. Is there a way I can go straight to steam's login page by clicking sign in button below? because clicking on sign in directs to another sign in with steam button (above) which seems repetitive.
    image

Thanks!

Hey, thanks!

  1. Yes, this button can be customized. Just pass style property:
export interface OAuthProviderButtonStyles {
  logo: string
  logoDark: string
  bg: string
  bgDark: string
  text: string
  textDark: string
}
  1. Yep, just do this:
import { signIn } from 'next-auth/react'

signIn('steam')

Small note: I would rather import PROVIDER_ID from the library than specifying steam directly:

import { PROVIDER_ID } from 'next-auth-steam'
import { signIn } from 'next-auth/react'

signIn(PROVIDER_ID)

But it's up to you.

Thanks a lot! so much better :)