Code Monkey home page Code Monkey logo

Comments (6)

razorman8669 avatar razorman8669 commented on May 9, 2024

I actually see why the profile.scala.html page says the session is endless, and thats because the logic for this statement

    @currentAuth() { auth =>
        @Messages("playauthenticate.profile.logged") @_providerIcon(auth.getProvider())<br/>
        @if(auth.expires() == -1){
            @Messages("playauthenticate.profile.session", auth.getId(), Application.formatTimestamp(auth.expires()))
        } else {
            @Messages("playauthenticate.profile.session_endless", auth.getId())
        }
    }

should say @if(auth.expires() != -1){ ie: (!= NOT ==)

That appears to be a bug with the play-authenticate-usage sample...

I would still like to know if refreshing the oauth token is something to pursue with Play-Authenticate

from play-authenticate.

joscha avatar joscha commented on May 9, 2024

Good catch - if you fixed it in your stream, would you send me a pull request please?

from play-authenticate.

joscha avatar joscha commented on May 9, 2024

Regarding the expiry, you are right - this could be implemented in Play! Authenticate, so that after the timeout Play! Authenticate will try to renew the session and only time it out if the access has been revoked or the user isn't there any more. The refresh token can actually be gathered from the OAuth properties. I was wondering to include that in the core, decided against it, because it might not be available for all providers - if you send me a pull request with this feature being configurable, I would be more than happy to merge it!

from play-authenticate.

razorman8669 avatar razorman8669 commented on May 9, 2024

I havent gotten around to fixing it yet. Might be a while. but it seems
like something that could be really useful! Ill let you know if I start
working on it.

On Thu, Feb 28, 2013 at 3:21 PM, Joscha Feth [email protected]:

Regarding the expiry, you are right - this could be implemented in Play!
Authenticate, so that after the timeout Play! Authenticate will try to
renew the session and only time it out if the access has been revoked or
the user isn't there any more. The refresh token can actually be gathered
from the OAuth properties. I was wondering to include that in the core,
decided against it, because it might not be available for all providers -
if you send me a pull request with this feature being configurable, I would
be more than happy to merge it!


Reply to this email directly or view it on GitHubhttps://github.com//issues/57#issuecomment-14255216
.

from play-authenticate.

gmsa avatar gmsa commented on May 9, 2024

Does Play! Authenticate already has a way of renewing the session, or will it always expire after 1 hour?

from play-authenticate.

joscha avatar joscha commented on May 9, 2024

it deliberately expires after 1 hour right now.

from play-authenticate.

Related Issues (20)

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.