db2 本地db 到实例
This guide will help you log in to your local FCC site using your GitHub account. This process should be similar for logging in with other social media accounts. This guide assumes you already have a local copy of FCC up and running.
本指南将帮助您使用GitHub帐户登录到本地FCC站点。 使用其他社交媒体帐户登录时,此过程应类似。 本指南假定您已经启动并运行了FCC的本地副本。
TL; DR (TL;DR)
Homepage field:
http://localhost:3000/
主页字段:
http://localhost:3000/
Callback field:
http://localhost:3000/auth/github/callback
回调字段:
http://localhost:3000/auth/github/callback
Copy/paste the Client ID and Client Secret into your
.env
file将客户端ID和客户端密钥复制/粘贴到您的
.env
文件中- Use port 3000 when viewing your local FCC site 查看本地FCC站点时使用端口3000
Free Code Camp Issue Mods and staff are on hand to assist with Pull Request related issues on our Help Contributors Chat Room
免费Code Camp问题Mods和工作人员可以在我们的帮助贡献者聊天室中协助解决Pull Request相关问题
免责声明 (Disclaimer)
The output from running $ gulp
mentions the Access Port is 3001. I have only successfully logged in with GitHub at port 3000 - the Proxy Port. If you understand how to log in using other ports, please consider submitting a pull request on this wiki.
运行$ gulp
的输出提到访问端口为3001。我只有在GitHub端口3000( 代理端口)成功登录GitHub。 如果您了解如何使用其他端口登录,请考虑在此Wiki上提交拉取请求。
使用您的GitHub帐户登录 (Log In Using Your GitHub Account)
Register a new OAuth application and click Register new application
注册新的OAuth应用程序 ,然后单击注册新的应用程序
Alternatively, click your Profile Picture => Settings => Applications => Developer applications => Register new application
或者 ,单击您的个人资料图片 => 设置 => 应用程序 => 开发人员应用程序 => 注册新应用程序
Fill out OAuth application fields
填写OAuth应用程序字段
Application name - choose any name, like
fcc-local
应用程序名称 -选择任何名称,例如
fcc-local
Homepage URL - set to
http://localhost:3000/
主页网址 -设置为
http://localhost:3000/
Application description - optional
应用说明 -可选
Authorization callback URL - set to
http://localhost:3000/auth/github/callback
授权回调URL-设置为
http://localhost:3000/auth/github/callback
Click Register application to see the newly registered application page with your Client ID and Client Secret.
单击注册应用程序以查看带有您的客户端ID和客户端密钥的新注册的应用程序页面。
Copy and paste your Client ID and Client Secret into your
.env
file.将您的客户ID和客户机密复制并粘贴到您的
.env
文件中。
Note: your Client ID and Client Secret will be long alphanumeric values.
注意:您的客户ID和客户机密将是长字母数字值。
提示 (Tips)
Remove / unset with comment block the unwanted provider in passport-provider.
Add SESSIONSECRET and COOKIESECRET in
.env
if you get error on express-session and cookieParser.如果在express-session和cookieParser上出错,则在
.env
添加SESSION SECRET和COOKIE SECRET。
COOKIE_SECRET='secret' SESSION_SECRET='secret'
COOKIE_SECRET='secret' SESSION_SECRET='secret'
Run command
node seed
before rungulp
if you dont get the challenges.如果您没有挑战,请在运行
gulp
之前运行命令node seed
。
已完成 (Finished)
Congratulations! You can now successfully log into your local FCC site using your GitHub account.
恭喜你! 现在,您可以使用GitHub帐户成功登录到本地FCC站点。
翻译自: https://www.freecodecamp.org/news/how-to-login-to-your-local-instance-of-freecodecamp/
db2 本地db 到实例