Code Monkey home page Code Monkey logo

Comments (11)

gharlan avatar gharlan commented on September 2, 2024

Are you using 2-factor authentification?

What is the result of this terminal command?

sqlite3 ~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/de.gh01.alfred.github/db.sqlite 'SELECT content FROM request_cache WHERE url = "https://github.com/command_bar/users"'

Empty json object or an object containing all your followed users (and yourself)?

from alfred-github-workflow.

ulken avatar ulken commented on September 2, 2024

Are you using 2-factor authentification?

That would be a negative.

sqlite3 ~/Library/Application\ Support/Alfred\ 2/Workflow\ Data/de.gh01.alfred.github/db.sqlite 'SELECT content FROM request_cache WHERE url = "https://github.com/command_bar/users"'

Result: {"results":[]}

Looks pretty empty to me! And what does that tell us?

Thanks for your reply!

from alfred-github-workflow.

ulken avatar ulken commented on September 2, 2024

Woops, didn't mean to close...

from alfred-github-workflow.

gharlan avatar gharlan commented on September 2, 2024

And what is the result of https://github.com/command_bar/users?

And what does that tell us?

I use this as indicator that the session has terminated by github. Because I thought for an existing session it should return at least the logged in user himself.

from alfred-github-workflow.

ulken avatar ulken commented on September 2, 2024

OK, I think you are on to something there, because that returns an empty JSON object as well.

from alfred-github-workflow.

ulken avatar ulken commented on September 2, 2024

What makes you assume a user follows him/herself? Just wondering.

But for now, are you saying all it would take is to follow a user?

Edit: Just tried that, and it seems like it takes a while for the changes to occur. I'll report back on that.

from alfred-github-workflow.

ulken avatar ulken commented on September 2, 2024

Confirmed

It know works (after I followed you). Follow up on my last question: Are you listed in your own list?

from alfred-github-workflow.

gharlan avatar gharlan commented on September 2, 2024

Thanks for your feedback!

Are you listed in your own list?

With my main user: yes. But I've created a test user @gharlan-test, and there the list does not contain the user himself. Don't know why..
So I have to change the session check, empty user list is not a good indicator for terminated session.. ;)

from alfred-github-workflow.

ulken avatar ulken commented on September 2, 2024

I see. Weird.

from alfred-github-workflow.

ulken avatar ulken commented on September 2, 2024

Not sure how robust of a check it would be, but I do believe you could make a request to Settings > Profile and check the status code:

  1. If 200 -> Good to go (session still active)
  2. If 302 (Redirection to login page) -> You're not logged in anymore (session terminated?)

Make sure it's the entire path https://github.com/settings/profile, and not only https://github.com/settings/, because that would also result in a redirection (to (https://github.com/settings/profile).

Just a suggestion (since I broke the bad news to you 👅)

from alfred-github-workflow.

gharlan avatar gharlan commented on September 2, 2024

Thanks, good idea. ;)

I still use the user list as first indicator because I have to request the list anyway. But if the list is empty I verify the login status with https://github.com/settings/profile.

from alfred-github-workflow.

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.