Giter Site home page Giter Site logo

Comments (2)

motia avatar motia commented on July 18, 2024 1

I have added the feature in the dev branch. You can try it out, though I did not try it with OAuth yet.
To provide an example, I am afraid I can not do that in the near future.

But you can try the feature yourself:

yarn add https://github.com/motia/nuxt-auth-refresh@dev

Basically, you need is to configure the package as follows:

{
      authStrategy: 'google',
      authScheme: 'oauth2',
      loginUrl: 'www.googleapis.com/oauth2/v4/token',
      refreshUrl: 'www.googleapis.com/oauth2/v4/token',
      logoutUrl: 'https://accounts.google.com/o/oauth2/revoke',

      refreshPeriod: X // a number of seconds that is adequate for the Google provider
}

Also, make sure the auth module is configured correctly. You should set the authorization_endpoint to 'https://accounts.google.com/o/oauth2/auth'

https://auth.nuxtjs.org/providers/google.html
https://github.com/nuxt-community/auth-module/blob/dev/lib/providers/google.js

Cheers

from nuxt-auth-refresh.

motia avatar motia commented on July 18, 2024

merged into master #8

from nuxt-auth-refresh.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.