Hi.
I am using OpenAPI 2.0, node, firebase.
In my yaml file, i have this endpoint:
/login:
post:
tags:
- auth
description: 'User/Pass Login'
operationId: loginUser
consumes:
- application/json
produces:
- application/json
parameters:
- {description: 'The user metadata to create', in: body, name:
post, required: true, schema: {$ref: '#/definitions/Login'}}
responses:
'200': {description: 'New user created', schema: {$ref:
'#/definitions/User'}}
x-swagger-router-controller: auth
Since firebase-admin does not have a way to use vanilla user/pass to login
and I would prefer to expose a /login endpoint vs rely on the firebase
client SDK, I am wondering if it would be possible to use OpenAPI to wire
up my /login endpoint but in reality use the Firebase Auth REST API behind
the scenes?
So, for my /login endpoint, I would be passing the posted values to the
below:
https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=[API_KEY]
This would return idToken which could be used for subsequent API calls.
Ideally, there would be some attribute in OpenAPI that would allow me to do
this. I have been hunting but can't find an example of how this might be
done. Can somebody advise if my approach is possible?
I understand that, alternatively, I could configure my loginUser
OperationId method to wire up the verifyPassword API call. But, before I do
that, I am wondering if there is a native way to do this in OpenAPI?
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.