forked from jason/cpolis
Added config for Firebase key
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user