HubPress / hubpress.io

A web application to build your blog on GitHub
MIT License
2.81k stars 2.62k forks source link

Cannot login #21

Closed tsangiotis closed 9 years ago

tsangiotis commented 9 years ago

screen shot 2015-02-09 at 17 06 31

I have 2 factor authentication enabled so after the first failure, I tried to make a token myself but it does not seem to work.

Any ideas?

anthonny commented 9 years ago

Hi @tsagi !

Thank you for reporting this issue. Two factor auth is not implented yet that's why you can't login.

I'll work on it asap

NoobTaco commented 9 years ago

Having the same issue here.

ethanrubio commented 9 years ago

I can't log in as well, but I'm not using two factor.

Any help would be appreciated!

anthonny commented 9 years ago

@ethanrubio, i checked your config, it seems to be ok. Can you clear your cache and try again ?

ethanrubio commented 9 years ago

@anthonny I tried again, but no luck. All I get is the authentication error has occurred, and I should check the console. Should I try changing my password and trying again?

enjikaka commented 9 years ago

I had the same problem. Just needed a header in the request with the temporary token.

@anthonny Here's a fix: https://github.com/HubPress/hubpress.io/pull/34

therebelrobot commented 9 years ago

I don't have 2 step auth either, and can't log in. Commenting to follow :)

enjikaka commented 9 years ago

@therebelrobot If you can't wait; you can just replace the default vendor.js file with mine here that's located here: https://github.com/enjikaka/hubpress.io/blob/master/hubpress/scripts/vendor.js

therebelrobot commented 9 years ago

OOOoooooo! Thanks @enjikaka! I love this concept, and will definitely be diving into the code this week to see how it works.

therebelrobot commented 9 years ago

Hrmmm... Even after that update, I'm still getting the error:

api.github.com/authorizations?1423528491251:1 POST https://api.github.com/authorizations?1423528491251 422 (Unprocessable Entity)

app.js:3544 AuthServices - login error Object {path: "/authorizations", request: XMLHttpRequest, error: 422}

I've tried clearing cache, resetting my password, all nogo. Maybe I'll try reforking and see if that helps.

enjikaka commented 9 years ago

Hm yea. Try a fresh fork and then just add my vendor.js and set up your config.json correctly. That worked fine for me.

enjikaka commented 9 years ago

@therebelrobot Change the vendor.js in both the branches too. (master & gh-pages) Just to be sure you got it.

therebelrobot commented 9 years ago

Okiedokes :) thx!

enjikaka commented 9 years ago

I just tried forking it from here again into a new account and adding my vector.js. It worked fine after I got the correct settings in the config.json aswell. (It failed horribly when I didn't have the correct username and repo-name).

I'm unsure if it's possible, but can you try to log in here http://craffy.github.io/hubpress @therebelrobot ? You won't be able to make posts, but I think you can log in anyway. Remember that this only works when you generate a token with an app like Authy or Google Authenticator.

anthonny commented 9 years ago

@enjikaka, thank you so much for what you have done on 2FA ! :beers: I'll try too merge your code in the raw source ASAP, but this monday was crazy and now i need to work on the organisation of next the weeks.

I'll do my best :rocket:

therebelrobot commented 9 years ago

@anthonny , my login issues don't have anything to do with 2FA, as I don't even have it enabled. When I try to log in, I get POST https://api.github.com/authorizations?1423584613277 422 (Unprocessable Entity) showing up in the console. Here is the full response from the github API:

documentation_url: "https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization"
errors: [{resource: "OauthAccess", code: "already_exists", field: "description"}]
0: {resource: "OauthAccess", code: "already_exists", field: "description"}
message: "Validation Failed"

Why is this post necessary, and what can I do to bypass or fix this?

enjikaka commented 9 years ago

@anthonny Sound good! Good luck at work! :smiley:

jgillman commented 9 years ago

@enjikaka Dang, dude! Way to get that fix out fast. :beers: Can't wait to get this patch in.

deedubs commented 9 years ago

@tsagi it appears to work with 2FA now :tada:

tsangiotis commented 9 years ago

Awesome! :beers: :tada:

TheAshwanik commented 9 years ago

Hi @anthonny I have this weird problem. I was able to login with 2factor authentication. But now it always is redirecting to login page. When I enter 2factor auth code.. It says "Welcome back Ashwani".. But then does nothing. just sits on that login page. If I try to open any other page for settings, posts etc. It redirects me back to Login page. I have tired clearing the cache and tried again. But its same. Any pointers?

image

anthonny commented 9 years ago

Hi @TheAshwanik,

You must upgrade your instance of hubpress with the version 0.3.0. The Github authorization has changed and the 0.2.0 can't work anymore

You can find a blog post here https://blog.hubpress.io

TheAshwanik commented 9 years ago

Yup.. I figured.. Thanks for the tip. I think I am gonna subscribe now.. :) Thanks for you great work.

bimlas commented 7 years ago

Same problem was here: forked, login and everything worked, deleted the repo, forked again, cannot login.

Solution:

Login should work now.