Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@peili
Copy link
Contributor

@peili peili commented Nov 25, 2020

No description provided.

@google-cla
Copy link

google-cla bot commented Nov 25, 2020

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 @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

// [START sign_in_with_email_link]
// Admin SDK API to generate the sign in with email link.
const usremail = '[email protected]';
const useremail = '[email protected]';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useremail already exists as a const above, so we'll have to use a new variable name.

Copy link
Contributor Author

@peili peili Dec 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samtstern Then I'd suggest to be consistent with the other examples and reduce it to a single const at the top of the file? Well, I see the documentation uses different snippets of this file, so that doesn't help either.
We could wrap the code snippets in a function to allow different scopes to declare the same const.
(I don't know if that would break the [START sign_in_with_email_link] parsing)

() => {
// [START sign_in_with_email_link]
// Admin SDK API to generate the sign in with email link.
const useremail = '[email protected]';
....
// [END sign_in_with_email_link]
}

https://firebase.google.cn/docs/auth/admin/email-action-links?hl=EN-GB

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peili yes I think you're right that one function per snippet would be the better approach, just like we do over here:
https://github.com/firebase/snippets-web/blob/master/functions/callable.js#L17

@peili
Copy link
Contributor Author

peili commented Dec 4, 2020

@googlebot I signed it!

Copy link
Member

@thatfiredev thatfiredev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peili I went ahead and wrapped the code inside a function so that we can get this merged.

Thank you for your contribution!

@thatfiredev thatfiredev merged commit c08f1e4 into firebase:master May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants