How to get dummy google access token to test oauth google api

前端 未结 4 1180
伪装坚强ぢ
伪装坚强ぢ 2020-12-29 01:20

Is there any way in which I can generate access token to test oauth for logging in with gmail?

I have created a google app, and got the client and secret ids.

4条回答
  •  轮回少年
    2020-12-29 01:51

    Don't forget that you should be able to mock google OAuth. In other words, in most test situations (except for monitoring and certain types of load testing), it should be possible to simulate a successful connection to Google OAuth and the corresponding callback. In order to do that you may just have to use methods already present in the testing tool you are using.

    Even if this answer does not directly answer the subject, I think it was necessary to write it here to allow some people to consider this workaround, adapted to the majority of automated test situations.

提交回复
热议问题