targetwebsite.com has a google login button that takes you to the website:
As a response you get the location:
Parts:
- https://accounts.google.com/o/oauth2/auth
- ?client_id=867328024096-e1p5hbmra2s0g2psgqhhl7ldafla8qr9.apps.googleusercontent.com
- &redirect_uri=https://targetwebsite.com/login/google
- &response_type=code
- &scope=https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile
- &state=cH-mI0
If you log in there with google you come back to link
The part "code=4/0AX4X..." is different for each login.
How would it be possible to automate this process? (in Powershell)
As far as I understand, Google only allows you to create permanent login tokens for your own projects, not for others as in this case.