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

  • SEARCH
  • Home
  • 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 7973859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:13:20+00:00 2026-06-04T08:13:20+00:00

I am trying to get OAuth authentication done inside a Spotify app. By default,

  • 0

I am trying to get OAuth authentication done inside a Spotify app. By default, window.open is blocked, and I am not sure if there is any way to work around that. So, I was wondering what is the best way to handle that. I want to be able to do the following:
1) Redirect the user to the auth link
2) Once they’re authenticated, I want to be able to get notified to handle the return URL and extract the access token from it.

A few options, I am considering: 1) IFrame 2) $.ajax() -- problem is, this doesn't seem to load all javascript/css files from the auth url properly.

Any suggestions?

  • 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-04T08:13:22+00:00Added an answer on June 4, 2026 at 8:13 am

    I believe the auth.showAuthenticationDialog() API is just what you’re after. It’ll pop up a dialog for you showing the given URL, then give you back the parameters when the return URL is called. Documentation here.

    var sp = getSpotifyApi(1);
    var auth = sp.require('sp://import/scripts/api/auth');
    
    auth.showAuthenticationDialog('http://www.last.fm/api/auth/?api_key=LAST_FM_API_KEY&cb=sp://my_app_name', 'sp://my_app_name', {
    
        onSuccess : function(response) {
            // Response will be something like 'sp://my_app_name?token=xxxxxxx'
            console.log("Success! Here's the response URL: " + response);
        },
    
        onFailure : function(error) {
            console.log("Authentication failed with error: " + error);
        },
    
        onComplete : function() { }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to get TripIt OAuth authentication working, but I find the documentation to
I'm trying to implement a transient oAuth authentication for a web app I'm creating.
Trying to get a value out of 2d array inside of a hash and
I'm trying to get twitter update_profile_image to work using OAuth. I was using curl
I'm trying to get Twitter authentication working on my ASP.NET site. When you create
Android twitter Trying the following tutorial for Oauth based authentication and updating user status.
I'm trying to access an OAuth-protected resource on Google App Engine using a Java/Groovy
I'm trying to integrate an application with a Yahoo! api that requires oauth authentication
I'm trying to implement Google's OAuth 2.0 authentication for a web server application. I
I keep getting an invalid_grant error on trying to get an OAuth token from

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.