-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EN translation for passport tutorial #2235
Conversation
The maintainers of this repository would appreciate it if you could provide more information. |
docs/source/en/tutorials/passport.md
Outdated
## Title: Passport | ||
|
||
** "Login authentication" ** is a common business scenario, including "account password login method" and "third-party unified login." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 一个
*
且没空格 "
要改为 ` 吧?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
一个 * 且没空格 : do you mean Login authentication
?
" 要改为 `` 吧?: I will replace all " with ` in this part
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
** "Login authentication" **
的问题是 **
后面多一个 * 和一个空格,这样是得不到粗体的效果的。如果直接用 ` 的话可以省掉 **
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully it's good now :)
Codecov Report
@@ Coverage Diff @@
## master #2235 +/- ##
=======================================
Coverage 99.61% 99.61%
=======================================
Files 29 29
Lines 773 773
=======================================
Hits 770 770
Misses 3 3 Continue to review full report at Codecov.
|
@SunShinewyf 最后一个! |
docs/source/en/tutorials/passport.md
Outdated
|
||
**`Login authentication`** is a common business scenario, including "account password login method" and "third-party unified login". | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感觉那个 method 可以不要~
docs/source/en/tutorials/passport.md
Outdated
|
||
[Passport](http://www.passportjs.org/) is a highly scalable authentication middleware that supports the `Strategy` of `Github` ,`Twitter`,`Facebook`, and other well-known service vendors. It also supports login and authorization verification via account passwords. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
login and authorization verification -> login authorization verification(登录授权校验)
docs/source/en/tutorials/passport.md
Outdated
|
||
Egg provides an [egg-passport](https://github.com/eggjs/egg-passport) plugin on top of it, encapsulating general logic such as callback processing after initialization and authentication success, allowing the developer to use Passport with just a few API calls. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- on top of it,感觉有点不太好,换成 bases on it
- encapsulating 改为 this plugin encapsulates ,指代明确一点
- authentication success ->the success of authentication
- allowing the developer to use Passport with just a few API calls. -> so that the developers can use ...
docs/source/en/tutorials/passport.md
Outdated
The execution sequence of [Passport](http://www.passportjs.org/) is as follows: | ||
|
||
* User access page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User accesses page
docs/source/en/tutorials/passport.md
Outdated
* User access page | ||
* Check Session | ||
* Intercept the login authentication login page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intercept and jump to authentication login page
docs/source/en/tutorials/passport.md
Outdated
## Using Passport Ecosystem | ||
|
||
[Passport](http://www.passportjs.org/) has many middleware and it is impossible to carry out secondary packaging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
impossible to carry out secondary packaging -> impossible to have the second encapsulation
docs/source/en/tutorials/passport.md
Outdated
|
||
// Render login page, user input account password | ||
Router.get('/login', controller.home.login); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user inputs
docs/source/en/tutorials/passport.md
Outdated
## How to develop an egg-passport plugin | ||
|
||
In the previous section, we learned how to use a Passport middleware in the framework. We can further package it as a plugin and give back to the community. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
further package -> further encapsulated
docs/source/en/tutorials/passport.md
Outdated
``` | ||
|
||
Note: [egg-passport](https://github.com/eggjs/egg-passport) standardizes the configuration fields, which are unified as `key` and `secret`, so if the corresponding Passport middleware attribute names are inconsistent, the developer should perform the conversion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perform -> do
[egg-passport]: https://github.com/eggjs/egg-passport | ||
[passport-local]: https://github.com/jaredhanson/passport-local | ||
[eggjs/examples/passport]: https://github.com/eggjs/examples/tree/master/passport |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有一些代码片段首字母大写了~
docs/source/en/tutorials/passport.md
Outdated
|
||
Among them, we often use the latter, such as Google, GitHub, QQ unified login, which are based on [OAuth](https://oauth.net/2/) specification. | ||
|
||
[Passport](http://www.passportjs.org/) is a highly scalable authentication middleware that supports the `Strategy` of `Github` ,`Twitter`,`Facebook`, and other well-known service vendors. It also supports login and authorization verification via account passwords. | ||
[Passport](http://www.passportjs.org/) is a highly scalable authentication middleware that supports the `Strategy` of `Github` ,`Twitter`,`Facebook`, and other well-known service vendors. It also supports login authorization verification. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
via account passwords 这个还是要加上的~
@@ -248,7 +248,7 @@ $ egg-init --type=plugin egg-passport-local | |||
```js | |||
// {plugin_root}/config/config.default.js | |||
// https://github.com/jaredhanson/passport-local | |||
exports.passportLocal = { | |||
module.exports.passportLocal = { | |||
}; | |||
``` | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
该这一个地方就可以提交了~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
这个继续改改? 然后 rebase 下? |
95a7734
to
f792b68
Compare
docs(passport): translation for passport tutorial (#2235)
Added passport tutorial English documentation #363