Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication woes #342

Closed
basil-conto opened this issue Feb 4, 2018 · 22 comments
Closed

Authentication woes #342

basil-conto opened this issue Feb 4, 2018 · 22 comments
Assignees
Labels

Comments

@basil-conto
Copy link
Contributor

sx-version:

0.3 of 2018-01-28

emacs-version:

GNU Emacs 27.0.50 (build 4, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2018-02-03
  1. emacs -Q
  2. M-xpackage-initializeRET
  3. M-xsx-authenticateRET
    • Expected result: browser displays page with authentication token
    • Actual result: browser reports
      `http%3A%2F%2Fseanallred.com%2Fsx.el%2Fauth%2Fauth.htm` is not a valid uri
      
  4. C-g
  5. M-xfind-functionRETsx-authenticateRET
  6. C-ssx-auth-redirect-uri
  7. C-M-b
  8. M-xraise-sexpRET
  9. C-M-x
  10. M-xsx-authenticateRET
  11. Copy token displayed in browser into minibuffer and type RET
  12. M-xtoggle-debug-on-errorRET
  13. M-xsx-inboxRET
  • Expected result: SX inbox displayed
  • Actual result:
    Debugger entered--Lisp error: (error "Request failed: (nil) [403 access_denied] \"access_token was not created with `read_inbox` scope\"")
      signal(error ("Request failed: (nil) [403 access_denied] \"access_token was not created with `read_inbox` scope\""))
      error("Request failed: (%s) [%i %s] %S" nil 403 "access_denied" "access_token was not created with `read_inbox` scope")
      sx-request-make("inbox" ((pagesize . 100) (page . 1) (filter . "abcdefghijklmnopqrs")) get sx-request-response-get-items)
      sx-method-call(inbox :keywords nil :page 1 :filter ((inbox_item\.answer_id inbox_item\.body inbox_item\.comment_id inbox_item\.creation_date inbox_item\.is_unread inbox_item\.item_type inbox_item\.link inbox_item\.question_id inbox_item\.site inbox_item\.title) (site\.logo_url site\.audience site\.icon_url site\.high_resolution_icon_url site\.site_state site\.launch_date site\.markdown_extensions site\.related_sites site\.styling)))
      sx-inbox-get(nil 1)
      #f(compiled-function (page) #<bytecode 0x12f7ed1>)(1)
      sx-question-list-refresh()
      run-hooks(tabulated-list-revert-hook)
      tabulated-list-revert()
      sx-inbox(nil)
    
@vermiculus vermiculus self-assigned this Feb 4, 2018
@vermiculus vermiculus added the bug label Feb 4, 2018
@basil-conto
Copy link
Contributor Author

Speedy Gonzales support team! :)

@vermiculus
Copy link
Owner

The fact that my main project right now is a github client certainly helps 😉

@Luis-Henriquez-Perez
Copy link

To be clear, is there an alternative way to authenticate? Or is this package unable to authenticate at by any means this time?

@vermiculus
Copy link
Owner

I am unsure, to be perfectly honest. It's been a long time since I've worked with SE auth myself.

While I might not have had time to work on this project lately, I do promise I'd review/merge pull requests reasonably quickly if you're able to do the development.

@basil-conto
Copy link
Contributor Author

Here's an update of the recipe:

emacs-version:

In GNU Emacs 27.0.50 (build 10, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2018-06-04 built on thunk
Repository revision: 1dafa4a02ed45bb4d02c6dc34c55518858422088
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Debian GNU/Linux buster/sid
  1. emacs -Q
  2. M-xpackage-initializeRET
  3. M-xsx-authenticateRET
    • Expected result: browser displays page with authentication token
    • Actual result: browser reports:
      `redirect_uri` is not under the registered domain for this application
      

I wonder if this is caused by 46d9498?

@e2m4n
Copy link

e2m4n commented Aug 31, 2018

@basil-conto good find!
I worked around it by changing the stackoverflow oauth URL so that the domain part of redirect_uri was what it was before.
Then I could authenticate, and got redirected to a 404 page.
The auth token is there in the URL of that page for pasting back into emacs.

@basil-conto
Copy link
Contributor Author

Thanks @e2m4n, that works.

@manandearth
Copy link

@e2m4n

so that the domain part of redirect_uri was what it was before

What was it before?

@manandearth
Copy link

Oh.. found it.
You mean:
http%3A%2F%2Fseanallred.com%2Fsx.el%2Fauth%2Fauth.htm

Thanks!

@matthew-piziak
Copy link

matthew-piziak commented Nov 8, 2018

I'm still getting "redirect_uri is not under the registered domain for this application" when I run sx-authenticate. Is this something that hasn't been patched into the sx library yet?

@vermiculus
Copy link
Owner

That's likely. If someone wants to take a crack at it I'd be more than happy to review and merge a PR, but otherwise I won't likely have to investigate this with all my other commitments :frown:

@e2m4n
Copy link

e2m4n commented Jan 17, 2019

The error message is from Stack Overflow, and suggests that this can only be resolved by the Stack Apps app owner by adding the new domain to the whitelist. Once that's done this issue will auto-resolve :-)

@vermiculus
Copy link
Owner

I've edited the OAuth domain to vermiculus.github.io – can someone verify if that was sufficient to address this issue?

@matthew-piziak
Copy link

@vermiculus I've reached "Good news! Authentication was successful. Your authentication token is..." and pasted in my token. However upon, say, sx-inbox, I get sx-request-make: Request failed: (nil) [403 access_denied] "keyis not valid for passedaccess_token, token not found.".

@basil-conto
Copy link
Contributor Author

@vermiculus Thanks, everything works for me now.

@matthew-piziak
Copy link

Still broken for me. Same error:

sx-request-make: Request failed: (nil) [403 access_denied] "`key` is not valid for passed `access_token`, token not found."

@matthew-piziak
Copy link

Works for me now!

@basil-conto
Copy link
Contributor Author

Great, I'm therefore closing this report for now.

@godfrey-cw
Copy link

Getting the same error as @matthew-piziak -- any update on this front?

@basil-conto
Copy link
Contributor Author

Getting the same error as @matthew-piziak -- any update on this front?

Please provide the exact steps that you are taking along with what you expect and actually see at each stage, as I think authentication has been working for everyone here for a while now.

@godfrey-cw
Copy link

godfrey-cw commented Oct 13, 2019 via email

@matthew-piziak
Copy link

@godfrey-cw Are you being careful with leading/trailing whitespace? I don't quite remember but I think that that tripped me up at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants