The response of IdentitytoolkitV3#get_oob_confirmation_code does not include oob_code
Environment details
- OS: macOS Monterey
- Ruby version: ruby 3.1.3p185
- Gem name and version:
- name:
google-apis-identitytoolkit_v3 - version: v0.14.0
- name:
Steps to reproduce
Preparation in advance: need to create an authentication user on firebase console (I use email/password as sign-in method.)
- Create a
Google::Apis::IdentitytoolkitV3::IdentityToolkitServiceinstance - Set the authorization scope to "https://www.googleapis.com/auth/cloud-platform"
- Prepare a relying party request using
Google::Apis::IdentitytoolkitV3::Relyingparty - Send the request using
get_oob_confirmation_codemethod to send a password reset email - Verify that the oob_code attribute is included in the response
Code example
service = Google::Apis::IdentitytoolkitV3::IdentityToolkitService.new
service.authorization = Google::Auth::ServiceAccountCredentials.make_creds(scope: "https://www.googleapis.com/auth/cloud-platform")
# Email address is a mock value
request = Google::Apis::IdentitytoolkitV3::Relyingparty.new(email: "[email protected]", request_type: "PASSWORD_RESET")
response = service.get_oob_confirmation_code(request)
## => Success, and I recieved an email.
# Verify that the `oob_code` attribute is included in the response
response.oob_code
More detailed description
I executed the code shown in the Code example section above, which sends a password reset email.
I expected the following:
response.oob_code
=> "oob_code sent in the email"
but I actually got:
response.oob_code
=> nil
According to the IdentitytoolkitV3::GetOobConfirmationCodeResponse documentation on RubyDocs, the oob_code attribute seems to be included in the response. However, I am unsure when this attribute is included, and why it is not present in the response I received.
Hi @takatea , Thank you for reaching out to us. Github issues are generally to deal with library issues or any feature requests. For library usage questions, I'd recommend to ask this question on StackOverflow's Google Cloud collective which is the most appropriate for general troubleshooting.
I'm going to close this issue for now, but please let us know if there's anything we can do to help!