SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Aug 2013
    New Zealand
    5 Post(s)
    0 Thread(s)

    Looking for OAuth2 javascript example

    I am looking into using the Google Drive API using only bearer and refresh tokens.

    Therefore, what I am looking for is a sample script in javascript that takes the OAuth2 flow from client secret and Client ID and goes through the process of getting an authorization code and then exchanging this authorization code for a bearer and refresh token. I've heard the refresh token never expires (until revoked) so then the plan is to use these in an automated backup script to backup to Google drive.

    I am only looking for a javascript code to take me to the bearer and refresh token output in the browser. I don't need it to do the backup. I will use a seperate script for that. Any ideas on where to find such a script? I could probably write one in time but I'm trying not to reinvent the wheel.

  2. #2
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    The Netherlands
    153 Post(s)
    2 Thread(s)
    Something like this?
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts