MCPcopy
hub / github.com/simstudioai/sim / main

Function main

packages/db/scripts/register-sso-provider.ts:667–687  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

665}
666
667async function main() {
668 console.log('🔐 Direct Database SSO Registration Script (Better Auth Best Practice)')
669 console.log('====================================================================')
670 console.log('This script directly inserts SSO provider records into the database.')
671 console.log("It follows Better Auth's exact registerSSOProvider logic.\n")
672
673 const success = await registerSSOProvider()
674
675 if (success) {
676 console.log('🎉 SSO setup completed successfully!')
677 console.log()
678 console.log('Next steps:')
679 console.log('1. Configure the callback URL in your identity provider')
680 console.log('2. Restart your application if needed')
681 console.log('3. Users can now sign in with SSO!')
682 process.exit(0)
683 } else {
684 console.log('💥 SSO setup failed. Check the logs above for details.')
685 process.exit(1)
686 }
687}
688
689main().catch((error) => {
690 logger.error('Script execution failed:', { error })

Callers 1

Calls 2

registerSSOProviderFunction · 0.85
logMethod · 0.80

Tested by

no test coverage detected