Added config for Firebase key

This commit is contained in:
2024-08-23 21:45:10 +02:00
parent b451da7e8e
commit 365d5a68a1
5 changed files with 25 additions and 17 deletions

View File

@ -12,12 +12,12 @@ type Client struct {
*auth.Client
}
func NewClient() (*Client, error) {
func NewClient(c *Config) (*Client, error) {
var err error
client := new(Client)
ctx := context.Background()
opt := option.WithCredentialsFile("path/to/serviceAccountKey.json")
opt := option.WithCredentialsFile(c.FirebaseKey)
app, err := firebase.NewApp(ctx, nil, opt)
if err != nil {