Git Product home page Git Product logo

Comments (7)

yeriomin avatar yeriomin commented on June 29, 2024

Hello.
I wrote a small web service which gives out auth tokens to anyone who asks. Like this:
http://tokendispenser-yeriomin.rhcloud.com/token/email/[email protected]
http://tokendispenser-yeriomin.rhcloud.com/token-ac2dm/email/[email protected]

It has been successfully used for a couple of weeks in my Play Store alternative android app. It stores email-password pairs in a mongodb storage and generates new auth tokens on request. Right now it is deployed on RedHat OpenShift, but can be deployed anywhere.

from gplaycli.

matlink avatar matlink commented on June 29, 2024

Well, I'll need an explanation on how it works, since it does not seem to require a password. Is the [email protected] account configured in your tokendispenser instance?

from gplaycli.

yeriomin avatar yeriomin commented on June 29, 2024

It stores email-password pairs and asks Google to create a token with a request to https://android.clients.google.com/auth.

I've taken email and password from your credentials.conf and put them into the tokendispenser's db. How you do it is up to you. OpenShift has an option to install rockmongo, so I'm using that. I considered adding a PUT method protected by basic http auth to tokendispenser, but it seems an overkill at this point.

from gplaycli.

matlink avatar matlink commented on June 29, 2024

Alright, very nice.
How do I use the token? Should it replace the password, or should I modify my code to use a token-way authentication?

from gplaycli.

yeriomin avatar yeriomin commented on June 29, 2024

Instead of
api.login(self.config["gmail_address"], self.config["gmail_password"], None)
Use
api.login(None, None, token_from_token_dispenser)

...i think. Didn't try it.

from gplaycli.

matlink avatar matlink commented on June 29, 2024

Works like a charm.
I'll need to push it now :)

from gplaycli.

matlink avatar matlink commented on June 29, 2024

Fixed by 562b53f

from gplaycli.

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.