Skip to content

WithoutAuthentication client option seems to be ignored #357

@mitar

Description

@mitar
  • Operating System version: Ubuntu 18.04.4
  • Firebase SDK version: (not sure what this is)
  • Library version: v3.12.0
  • Firebase Product: auth

Steps to reproduce:

I am trying to verify ID tokens. From me looking at the code it looks like that that does not need any API access (I am not checking for revocations), but I cannot really initialize the app like that.

Relevant Code:

	config := &firebase.Config{
		ProjectID: "foobar",
	}

	app, _ := firebase.NewApp(ctx, config, option.WithoutAuthentication())
        client, _ := app.Auth(ctx)

When I then call client.VerifyIDToken(ctx, jwt), I get:

google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.

I would expect that passing WithoutAuthentication would not try to obtain default credentials. It looks like DialSettings.TokenSource is used even if DialSettings.NoAuth is set?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions