试着跟随https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview,我很难过.
我已经config.omniauth :facebook, ENV['FB_APP_ID'], ENV['FB_APP_SECRET']
在我的routes.rb中配置了我的config/initializers/devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
devise.rb,并定义了一个OmniAuthCallbacks控制器.
当我访问时user_omniauth_authorize_path(:facebook)
,我得到:
Not found. Authentication passthru.
我不确定接下来该做什么.我没有使用路由全球,所以我不认为我需要定义一个passthru方法,但这样做只给了我404.
尝试让 Heroku 使用工作区为 Yarn v3 使用缓存模块。我有以下内容:
\npackage.json
:
"engines": {\n "node": "16.x",\n "yarn": "3.x"\n },\n "cacheDirectories": [\n "node_modules",\n "packages/components/node_modules",\n "packages/lib/node_modules",\n "packages/schema/node_modules",\n "packages/web/node_modules",\n "packages/web/.next/cache"\n ]\n
Run Code Online (Sandbox Code Playgroud)\nheroku-buildpack-features
:
cache-native-yarn-cache=true\n
Run Code Online (Sandbox Code Playgroud)\nHeroku 输出:
\n-----> Creating runtime environment\n \n NPM_CONFIG_LOGLEVEL=error\n USE_YARN_CACHE=true\n NODE_VERBOSE=false\n NODE_ENV=production\n NODE_MODULES_CACHE=true\n \n-----> Installing binaries\n ! You don't need to specify Yarn engine. Heroku will install the latest Yarn 1.x, so that per project version can be used. More information here: https://yarnpkg.com/getting-started/install#global-install\n https://devcenter.heroku.com/articles/nodejs-support\n \n engines.node (package.json): 16.x\n …
Run Code Online (Sandbox Code Playgroud)