Always be logged in to gmail in puppeteer's chromium - recaptcha

I want to reduce risk of having google recaptcha to solve, so I want to be always logged in on gmail, just like on normal chrome. I dont want to manually login every browser start. How can I do that?

You can use 'userDataDir' option ,while launching puppeteer. 'userDataDir' is a path to browser's user data directory. Find user directory by using "chrome://version" URL. UserDataDir is parent of Profile path.
refer [https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions]2

Related

How to Create OAuth Client ID?

I am trying to run this github project.
For this I need to create credentials and OAuth Client Id.
When I click to create. After selecting web applications and typing the name I see authorised javascript and authorised redirect uri.
So what should I enter there because I tried with keeping both fields empty. But I got error saying no redirect url found for client id
Please help me.
I am using Developer Console for first time can't find any help on internet. This site is my last hope.
I did as said in [comment].2
Here is what I got in Linux shell and the error i received on redirected url opened webpage.
Linux Shell Message
/YouTube-Subscription-Importer/env/lib/python3.6/site-packages/oauth2client/_helpers.py:255: UserWarning: Cannot access subscribe.py-oauth2.json: No such file or directory
warnings.warn(_MISSING_FILE_MESSAGE.format(filename))
Your browser has been opened to visit:
https://accounts.google.com/o/oauth2/auth?client_id=1069660256195-n8adm0dmi70v29i55hcfblftle09hb5n.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube&access_type=offline&response_type=code
If your browser is on a different machine then exit and re-run this
application with the command-line parameter
--noauth_local_webserver
Snipe of what redirect url webpage said
**MOST IMPORTANT
I am running this in windows bash.
Now tell me what to do next.
I just simply need a tutorial/how-to use guide for Google developer console credentials and OAuth Screen.
**
You need the redirect URL, you will be redirected from Google OAuth Consent Screen to https://REDIRECT_URL?code=AuthorizationCode, you can just set it to http://localhost.
After creation, you can your find Client ID on the Credentials page.

Is it possible to use RDP with same browser data as admin?

I just tried the RDP of windows 10 and it worked very well.
I have an admin account (named A), then I create another user (named B). When I use account B to log in RDP and open google chrome, I cannot access chrome data (history, cookies, passwords, ...), but it's like a newly installed chrome. So I want to ask is there any way that admin A and user B can use the same chrome data ? Thank you !
Chrome (probably for all the browsers) will store the browser data for different users in different location (location: C:\Users\<current-user-name>\AppData\Local\Google\Chrome\User Data\Default). So if you logged in as a different user, it will use different browser data to start the browser.
If you really want to, probably you need to login your Chrome using the same Google account and then turn on the sync option, which is the easiest way.
Or another idea is that you can try to copy the other users browser data (location: C:\Users\<other-user>\AppData\Local\Google\Chrome\User Data\Default) to your browser data location (location: C:\Users\<your-user>\AppData\Local\Google\Chrome\User Data\Default) (really not recommended because you won't know how Chrome deals with the data and I'm not sure whether this works, I guess it won't work)

How does Google One-Tap manage my refresh tokens? How does it differ from GAPI?

In the documents of Google One-Tap sign in, it says:
Returning users are signed in automatically, even when they switch devices or platforms, or after their session expires.
Question 1:
But it doesn't say anywhere how it does this? Is the user refresh token saved in the browser's cache? How can it then auto log in a user cross devices?
Question 2: The reason I ask is because I have a setup where I initialize the Google API client for JavaScript ("GAPI"). The GAPI library also automatically logs in a user whenever the client is "initialised" through gapi.client.init().
Now the problem is that after I have added the Google One-Tap code (Or should I say "YOLO code"? : ) my user gets logged in through One-Tap and also through GAPI. I can prevent this by not initializing the GAPI client, but I don't think that's wise, because I thought this whole library is built to manage my refresh tokens etc. Is my understanding correct that One-Tap does exactly the same and in case I only want to Authenticate users I do not need the GAPI client anymore?
Really, which library does a better job at managing my refresh tokens? And how do they differ? I'm clueless...
The way I implemented my login is the following:
Try to login in the user first using gapi.auth2. Maybe the user was previously signed into the site.
If can't login user automatically, then use googleyolo to try to find existing user accounts.
If no existing accounts, then present a signin button for user to signin.
I can give you some code snippet if you need.
To answer your questions.
#1, the credential is stored within the browser/device. If the user has never signed into google in a device, then yolo won't be able to sign in the user.
#2. googleyolo will also login the user, the difference is that it will give the account selector even if there's only one user to select (it will automatically login the user if there's only one). gapi simply sign in the user without showing anything.

How to sign-in to bitbucket?

I would like to sign-in with my Google credentials on BitBucket, but each time I go to
https://bitbucket.org/account/signin/
I am redirected to
https://bitbucket.org/socialauth/signup/?next=/
Which is not what I want.
I also removed all the cookies related to Atlassian and Bitbucket, but I don't know to to wipe all the used internal storage for this particular website.
Any idea?
It seems I am not the only one with this issue
It works from the incognito page, so it is somehow cookie related,but I don't want to remove all my cookies...
Have you tried to login from another browser?
Or try to login with your github account if it work.
If is your fist time with that gmail account note that you need to create it
You can make a "force refresh" with SHIFT+F5 in the page, or if you are using google chrome you can wipe all cookies & data with this guide
Sorry for my bad english.

How to get different connection for different browser session/machine so I can get different profile feeds?

I followed tutorial on:
https://spring.io/guides/gs/accessing-facebook/
I run the application and successfully authenticate with a single user. Home page returns my feeds.
Now I connect to the application from another browser/machine and go to home page - I see feeds of first browser session/machine.
I am expecting to be asked to log in again when connecting from different browser/machine.
What am I missing?
Didnt try it, and depends on exact configuration :
When you logged in on the first browser you gave facebook the permission to allow your application to access your facebook account.
If you are logged in to facebook before on the other browsers with the same user, the permission given to the app through interaction on the first browser might be sufficient.
You can try to use incognito mode on a browser, in this case you should definitely have to authorize again.

Resources