lollol
05/26/2025, 9:35 PM// Initialize supertoken
apiBasePath := "/api/v1/auth"
websiteBasePath := "/auth"
tokenInitError := supertokens.Init(supertokens.TypeInput{
Supertokens: &supertokens.ConnectionInfo{
ConnectionURI: os.Getenv("SUPERTOKEN_URI"),
// APIKey: <YOUR_API_KEY>
},
AppInfo: supertokens.AppInfo{
AppName: os.Getenv("APP_NAME"),
APIDomain: os.Getenv("API_DOMAIN"),
WebsiteDomain: os.Getenv("WEBSITE_DOMAIN"),
APIBasePath: &apiBasePath,
WebsiteBasePath: &websiteBasePath,
},
RecipeList: []supertokens.Recipe{
emailpassword.Init(nil),
session.Init(nil),
},
})
if tokenInitError != nil {
panic(tokenInitError.Error())
}
log.Default().Println("Auth service up")