Results 1 to 2 of 2

Thread: GitHub Callback URL

  1. #1
    Join Date
    Jan 2010
    Location
    london
    Posts
    38

    Default GitHub Callback URL

    Hi,

    I am trying to connect to GitHub using the Spring Social GitHub project but I am having difficulties with the callback URL.

    When I register my application on Github I have to provide a main URL and a callback URL (the app will only register if its a valid http://.. URL for each), and when I navigate my app to connect/github I get directed to the authorisation page, but when I say authorise it returns me to the callback URL i registerred with (I don't have a specific app URL so this cannot redirect to my app).

    I have read in teh GitHub docs:

    Redirect users to a this link to request GitHub access.

    GET https://github.com/login/oauth/authorize?
    client_id=...&
    redirect_uri=http://www.example.com/oauth_redirect


    and regarding the redirect_uri paramter it says the following:

    The redirect_uri parameter is optional. If left out, GitHub will redirect users to the callback URL configured in the OAuth Application settings. If provided, the redirect URL must match the callback URL's host.


    So it seems that the callback URL needs to be overriden at time of invoking, but having looked in the OAuth2Template.class there doesnt seem to be any option to do this.


    Has anyone else come across this?

  2. #2
    Join Date
    Jan 2010
    Location
    london
    Posts
    38

    Default

    Ok, I misread the details I just included!

    the redirect_uri was being provided by SpringSocial connection, but I had not spotted this bit: "If provided, the redirect URL must match the callback URL's host" - I updated the callback URL to the host I am currently using and it is now working.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •