-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(auth): Add enableAnonymousUser param to CreateTenant and UpdateTenant #412
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
@bojeil-google @rsgowman How is the progress of this plan? |
@bojeil-google @rsgowman Is there any problem with this pull request? I'm having trouble because I need this feature. |
This was proposed and added to the Node.js SDK: https://firebase.google.com/docs/reference/admin/node/admin.auth.Tenant#anonymoussigninenabled I don't think it's been approved for the Go SDK yet. |
Node.js SDK was released 8 months ago. firebase/firebase-admin-node#802 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @sonatard for your contribution. I apologies for the delay. We have completed the required internal reviews for this API. There is a minor change requested, please check the review comments. Also, please change the base branch to dev
instead of master
, you might also have to rebase it to dev
. Once that is done, we can merge this change.
@lahirumaramba Thank you for your review !! I fixed it. |
Hi @sonatard Thank you for updating the PR! I think your changes to |
@lahirumaramba I executed |
@lahirumaramba I found CI failed. Is there anything that I need to do? Fix format? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of comment phrasing things to look at, thanks!
auth/tenant_mgt.go
Outdated
@@ -240,6 +242,11 @@ func (t *TenantToCreate) EnableEmailLinkSignIn(enable bool) *TenantToCreate { | |||
return t.set(enableEmailLinkSignInKey, enable) | |||
} | |||
|
|||
// EnableAnonymousUsers enables or disables anonymous user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like EnableAnonymousUsers
is a literal that should be backticked for code font.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like we back-tick literals in Go SDK. ex: TenantClient
, AndroidNotification
etc.
auth/tenant_mgt.go
Outdated
@@ -240,6 +242,11 @@ func (t *TenantToCreate) EnableEmailLinkSignIn(enable bool) *TenantToCreate { | |||
return t.set(enableEmailLinkSignInKey, enable) | |||
} | |||
|
|||
// EnableAnonymousUsers enables or disables anonymous user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our auth docs use the term "anonymous authentication." Should that be used here?
I'd suggest that phrase, or, alternatively, "anonymous user access."
auth/tenant_mgt.go
Outdated
@@ -275,6 +282,11 @@ func (t *TenantToUpdate) EnableEmailLinkSignIn(enable bool) *TenantToUpdate { | |||
return t.set(enableEmailLinkSignInKey, enable) | |||
} | |||
|
|||
// EnableAnonymousUsers enables or disables anonymous user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like EnableAnonymousUsers
is a literal that should be backticked for code font.
auth/tenant_mgt.go
Outdated
@@ -275,6 +282,11 @@ func (t *TenantToUpdate) EnableEmailLinkSignIn(enable bool) *TenantToUpdate { | |||
return t.set(enableEmailLinkSignInKey, enable) | |||
} | |||
|
|||
// EnableAnonymousUsers enables or disables anonymous user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our auth docs use the term "anonymous authentication." Should that be used here?
I'd suggest that phrase, or, alternatively, "anonymous user access."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense, but in Go SDK we normally mention the function name followed by a description. Ex: AllowPasswordSignUp enables or disables email sign-in provider.
or EnableEmailLinkSignIn enables or disables email link sign-in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, OK, no backticks I could live with. But just "anonymous user" doesn't sound to me like a thing that can be enabled or disabled. Does it to you Lahiru?
I'd say that "email link sign-in" does sound like it can be disabled/enabled. FWIW at this point, "email sign-in provider" does not; "email sign-in provider support" or "email sign-in provider functionality" might.
This sounds like I'm splitting hairs, but one of the few things I bring to the table is an ear for written English. :) Let's get Kevin's input as well!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
"EnableAnonymousUsers enables or disables anonymous authentication."
(And FWIW, "AllowPasswordSignUp enables or disables the email sign-in provider.")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 Yup, "the" solves that latter one!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I misread your previous comment, sorry! I understand what we are referring to now.
I am good with // EnableAnonymousUsers enables or disables anonymous user authentication.
Thank you!
Hi, @sonatard Thank you for addressing the PR feedback! |
@lahirumaramba I fixed format 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sonatard Thank you again for being patient with all the PR changes. Just one more change to reference docs and we can merge this PR to include in the upcoming release.
Please change the comment // EnableAnonymousUsers enables or disables user.
to // EnableAnonymousUsers enables or disables anonymous authentication.
Thank you!
Co-authored-by: Lahiru Maramba <llahiru@gmail.com>
Co-authored-by: Lahiru Maramba <llahiru@gmail.com>
@lahirumaramba Thank you for your kind communication. I have had a very pleasant experience since the review began. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If Kevin's OK, I'm OK!
Thanks for sending!
Thanks!! |
#411
#372
"https://identitytoolkit.googleapis.com/v2beta1" does not support
enableAnonymousUser
param. use "https://identitytoolkit.googleapis.com/v2".RELEASE NOTE: Allowed enabling of anonymous provider via tenant configuration