代码之家  ›  专栏  ›  技术社区  ›  Felice

Spotify使用Meteor和xinranxiao登录:帐户Spotify

  •  3
  • Felice  · 技术社区  · 10 年前

    我正在尝试将Spotify登录功能添加到我的web应用程序 accounts-spotify 包裹然而,我得到重定向url错误。

    <head>
      <title>testMeteorSpotify</title>
    </head>
    
    <body>
      {{> loginButtons}}
      <h1>Welcome to Meteor!</h1>
    
      {{> hello}}
    </body>
    
    <template name="hello">
      <button>Click Me</button>
      <p>You've pressed the button {{counter}} times.</p>
    </template>
    

    以下是我的包裹:

    meteor-base             # Packages every Meteor app needs to have
    mobile-experience       # Packages for a great mobile UX
    mongo                   # The database Meteor supports right now
    blaze-html-templates    # Compile .html files into Meteor Blaze views
    session                 # Client-side reactive dictionary for your app
    jquery                  # Helpful client-side library
    tracker                 # Meteor's client-side reactive programming library
    
    standard-minifiers      # JS/CSS minifiers run for production mode
    es5-shim                # ECMAScript 5 compatibility for older browsers.
    ecmascript              # Enable ECMAScript2015+ syntax in app code
    
    autopublish             # Publish all data to the clients (for prototyping)
    insecure                # Allow all DB writes from clients (for prototyping)
    accounts-ui
    xinranxiao:accounts-spotify
    

    我在spotify的api门户网站上创建了一个应用程序,并在帐户spotifysetup登录按钮中输入了客户端密码和客户端id。

    enter image description here

    enter image description here

    遵循此过程后,我仍然会收到一个redierct错误。 enter image description here

    1 回复  |  直到 10 年前
        1
  •  1
  •   Xinzz    10 年前

    我们离线交谈,问题是缺少服务配置。

    i、 e.以下需要存在:

    (in server-side code)
    ServiceConfiguration.configurations.update(
      { "service": "spotify" },
      {
        $set: {
          "clientId": "<your clientId>",
          "secret": "<your secret>"
        }
      },
      { upsert: true }
    );