Nekonyx / next-auth-steam

Steam authentication provider for next-auth
70 stars 18 forks source link

button customization #5

Closed kkagill closed 1 year ago

kkagill commented 1 year ago

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!

Nekonyx commented 1 year ago

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
    }
  2. Yep, just do this:
    
    import { signIn } from 'next-auth/react'

signIn('steam')

Nekonyx commented 1 year ago

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.

kkagill commented 1 year ago

Thanks a lot! so much better :)