Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9136251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:55:42+00:00 2026-06-17T08:55:42+00:00

Concerning https://github.com/sinatra/sinatra/issues/596 , which i wrongly diagnosed as a sinatra bug. I’m having the

  • 0

Concerning https://github.com/sinatra/sinatra/issues/596, which i wrongly diagnosed as a sinatra bug.

I’m having the following issue: I’m using Soundcloud OAuth workflow to implement single-sign-on in a project of mine. For that I’m using the “soundcloud” gem. So, after being redirected to soundcloud’s sign-in/authorization form and pressing “Connect”, I’m redirected back to the URL from my app I have specified as the redirect url… but some hash parameters come behind! So, let’s say, instead of being redirected to “http://myapp.com/connect?code=123”, I am instead being redirected to “http://myapp.com/connect?code=123#access_token=qwerty”. Since hash parameters are not part of the HTTP protocol, it does have secondary effects on the server, but on the client, the bleepin hash params just do not go away! Basically, on my redirect endpoint, I’m fetching the code given by soundcloud, pinging Soundcloud’s token exchange for a fresh access token, storing it and redirecting to my homepage, ‘/’. But the browsers do not clean the hash parameters on redirects, so that means I’m being redirected to “http://myapp.com/#access_token=qwerty”. And that just sucks. Is there a workaround to this issue or is this a soundcloud “bug”? (Not exactly a bug because it doesn’t break a thing, it is just plain ugly to have those hash params there).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:55:43+00:00Added an answer on June 17, 2026 at 8:55 am

    [Answered the same thing in that thread that you’ve linked but will try to summarize that here]

    One reason I can think is to ensure JS cross-compatible API. That is, when using JS to authenticate the user, this is the only way to read the result of the authentication url parameters – by parsing the attributes after the # in the URL. This is as far as I can reason with the design.

    And yes, there is a work-around:

    Actually, the API server has more features which are not implemented directly in the Ruby driver yet. The result of the client.authorize_url call is of this type:

    "https://#{host}#{AUTHORIZE_PATH}?response_type=code_and_token
                                      &client_id=#{client_id}
                                      &redirect_uri=#{URI.escape redirect_uri}
                                      &#{additional_params}"
    (Ignore the `additional_params` part for now)
    

    The response_type parameter can take other values too but unfortunately, this is not a readily-available feature in the Ruby API wrapper. The possible values are:

    • response_type=code which embeds the code which can later be used to generate the access_token of the user. This can be done by running client.exchange_code(:code => params[:code]) as mentioned in the API reference docs.
    • response_type=token which embeds the access_token and avoids the code parameter. However, unlike the code parameter, the access_token is not a query parameter but is prefixed with a # and so, JS is the only way to get this value.

    You can verify this here: http://developers.soundcloud.com/docs/api/reference#connect. One of the parameters than can be changed is the response_type. The additional parameters are display, state and scope which are listed out in the above link

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've decided to use the following ImageMagick library for iPhone development: https://github.com/marforic/imagemagick_lib_iphone It works
So I used the html2haml converter to convert the following: https://gist.github.com/1379702 from http://css-tricks.com/2361-jquery-ui-tabs-with-nextprevious/ to
in https://rt.cpan.org/Ticket/Display.html?id=37194#txn-641389 I reopened a bug concerning a Perl crash in conjunction with the
I am trying to converting a non-ARC project ( https://github.com/allaboutapps/A3GridTableView ) to ARC using
The complete code is on https://gist.github.com/1341623 I'd like to sort an index array (or
Consider this gist: https://gist.github.com/752934 When converting from String to Time everything goes well. It
Concerning the following situation: www.foo.com is a page delivered in UTF-8. It features a
Concerning the following situation: www.foo.com is a page delivered in UTF-8. It features a
Hey guys im using this Devise model : https://github.com/plataformatec/devise/wiki/How-To%3a-Require-admin-to-activate-account-before-sign_in do anyone know where i
I found this https://gist.github.com/2945472 but I need an implementation that does not depend on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.