google-api-nodejs-client icon indicating copy to clipboard operation
google-api-nodejs-client copied to clipboard

Google login test automation

Open festo opened this issue 10 years ago • 11 comments

We have an application where a user can login with Google or Facebook. The client (iOS and Android) requests an access token and sends it back to our server where passport-google-token fetches the user information. Everything works fins.

I would like to write some tests for the google token based authentication but I don't want to insert my (test user's) access token every times and actually the tests are running on a CLI machine so I'm not able to insert new tokens ...

For Facebook, I can create new test user with an app token and the Graph API sends back an access token by default. https://developers.facebook.com/docs/graph-api/reference/v2.8/app/accounts/test-users

Is there any similar feature for Google. I know I can do some magic with PhantomJS but that wouldn't be the nicest solution.

festo avatar Nov 10 '16 13:11 festo

You might try https://developers.google.com/oauthplayground/

For reference: http://stackoverflow.com/questions/25657190/how-to-get-dummy-google-access-token-to-test-oauth-google-api

jmdobry avatar Dec 28 '16 22:12 jmdobry

Sorry for bringing this up again, @jmdobry. This looks like a prematurely closed question. It seems that the solution involving a playground doesn't allow a pure programmatic way to test tokens. (Again, as @festo rightly noted, Facebook has a test user facility for this. Would be nice if Google did something alike.)

andrevinsky avatar Apr 06 '18 14:04 andrevinsky

Greetings folks! I posed this question internally, and they directed me towards this forum: https://groups.google.com/forum/#!forum/google-federated-login-api

If a feature like this were available - we would absolutely support it in the client library! Unless it exists in the underlying service, there ain't a lot we can do in here.

I'm going to close this issue out for now. I really would suggest following up on that forum, and letting us know how it goes!

JustinBeckwith avatar May 11 '18 18:05 JustinBeckwith

I came to this post while I am finding a solution for unit testing Google sign-in. Unfortunately, the forum link that @JustinBeckwith mentioned above does not exist anymore. Maybe it was already concluded and there might be new updates on it somewhere else.

BradKwon avatar Dec 03 '19 11:12 BradKwon

News?

lamba92 avatar Aug 04 '20 08:08 lamba92

Any new updates arrived?

naganevsachin avatar Aug 11 '20 07:08 naganevsachin

I success fully put ion food Code for dom. The Turkey may be available, too, if he can turn the key.

DMC2 will get back to me via any means.

Looking good.

Kind regards, Richard.

Sent from my iPhone

On 11 Aug 2020, at 5:34 PM, coming___soon [email protected] wrote:

 Any new updates arrived?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

KapitalEarth avatar Aug 11 '20 07:08 KapitalEarth

Attached.

Sent from my iPhone

On 11 Aug 2020, at 5:51 PM, Richard Wilson [email protected] wrote:

I success fully put ion food Code for dom. The Turkey may be available, too, if he can turn the key.

DMC2 will get back to me via any means.

Looking good.

Kind regards, Richard.

Sent from my iPhone

On 11 Aug 2020, at 5:34 PM, coming___soon [email protected] wrote:

 Any new updates arrived?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

KapitalEarth avatar Aug 11 '20 09:08 KapitalEarth

Attached#2

Sent from my iPhone

On 11 Aug 2020, at 7:23 PM, Richard Wilson [email protected] wrote:

Attached.

<image0.jpeg>

Sent from my iPhone

On 11 Aug 2020, at 5:51 PM, Richard Wilson [email protected] wrote:

I success fully put ion food Code for dom. The Turkey may be available, too, if he can turn the key.

DMC2 will get back to me via any means.

Looking good.

Kind regards, Richard.

Sent from my iPhone

On 11 Aug 2020, at 5:34 PM, coming___soon [email protected] wrote:

 Any new updates arrived?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

KapitalEarth avatar Aug 11 '20 09:08 KapitalEarth

Amendment with new alphabet suggestion for Alphabet. Regards, R.

Sent from me and my iPhone

On 11 Aug 2020, at 11:37 PM, Richard Wilson [email protected] wrote:

 WOO &/or WIP. TBC. FYI.

Kind regards, Richard.

<image0.png>

Sent from my iPhone

On 11 Aug 2020, at 7:50 PM, Richard Wilson [email protected] wrote:

Attached#2 <image0.png>

Sent from my iPhone

On 11 Aug 2020, at 7:23 PM, Richard Wilson [email protected] wrote:

Attached.

<image0.jpeg>

Sent from my iPhone

On 11 Aug 2020, at 5:51 PM, Richard Wilson [email protected] wrote:

I success fully put ion food Code for dom. The Turkey may be available, too, if he can turn the key.

DMC2 will get back to me via any means.

Looking good.

Kind regards, Richard.

Sent from my iPhone

On 11 Aug 2020, at 5:34 PM, coming___soon [email protected] wrote:

 Any new updates arrived?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

KapitalEarth avatar Aug 11 '20 14:08 KapitalEarth

Amendment now attached. R.

On 12 Aug 2020, at 12:37 AM, Richard Wilson [email protected] wrote:

Amendment with new alphabet suggestion for Alphabet. Regards, R.

<image0.png>

Sent from me and my iPhone

On 11 Aug 2020, at 11:37 PM, Richard Wilson [email protected] wrote:

 WOO &/or WIP. TBC. FYI.

Kind regards, Richard.

<image0.png>

Sent from my iPhone

On 11 Aug 2020, at 7:50 PM, Richard Wilson [email protected] wrote:

Attached#2 <image0.png>

Sent from my iPhone

On 11 Aug 2020, at 7:23 PM, Richard Wilson [email protected] wrote:

Attached.

<image0.jpeg>

Sent from my iPhone

On 11 Aug 2020, at 5:51 PM, Richard Wilson [email protected] wrote:

I success fully put ion food Code for dom. The Turkey may be available, too, if he can turn the key.

DMC2 will get back to me via any means.

Looking good.

Kind regards, Richard.

Sent from my iPhone

On 11 Aug 2020, at 5:34 PM, coming___soon [email protected] wrote:

 Any new updates arrived?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

KapitalEarth avatar Aug 11 '20 14:08 KapitalEarth