First implementation of firebase auth

This commit is contained in:
2024-08-17 18:21:56 +02:00
parent 46bfd23b2a
commit bebfe994ae
3 changed files with 61 additions and 3 deletions

View File

@ -12,7 +12,7 @@ type Client struct {
*auth.Client
}
func NewApp() (*Client, error) {
func NewClient() (*Client, error) {
var err error
client := new(Client)
@ -32,8 +32,13 @@ func NewApp() (*Client, error) {
return client, nil
}
func (c *Client) Verify(token string) (*auth.Token, error) {
func (c *Client) Verify(idToken string) (*auth.Token, error) {
ctx := context.Background()
return nil, nil
token, err := c.VerifyIDTokenAndCheckRevoked(ctx, idToken)
if err != nil {
return nil, err
}
return token, nil
}