36 Commits

Author SHA1 Message Date
Mr Forest
1bb3d2dea9
feat: refactor backend i18n (#1373)
* fix: handle the dataSourceName when DB changes

* reduce duplication of code

* feat: refactor translation error message

* feat: use json intsead of ini file

* remove useless translation

* fix translate problems

* remove useless addition

* fix pr problems

* fix pr problems

* fix split problem

* use gofumpt to fmt code

* use crowdin to execute backend translation

* fix pr problems

* refactor: change translation file structure same as frontend

* delete useless output

* update go.mod
2022-12-07 13:13:23 +08:00
Mr Forest
fe448cbcf4
feat: check user existence when signing in via verification code (#1334)
* fix:check user existence when logining by verification code

* fix review problems

* Update verification.go

Co-authored-by: hsluoyz <hsluoyz@qq.com>
2022-11-28 00:11:33 +08:00
Mr Forest
d86f3c88c7
feat: support i18n in backend err messages (#1232)
* feat: support i18n in backend err messages

* use gofumpt to fmt code

* fix review problems

* support auto generate err message

* delete beego/i18n moudle

* fix Github action test problems

* fix review problems

* use gofumpt to format code

* use gofumpt to fmt code
2022-10-23 15:16:24 +08:00
Gucheng Wang
e1331f314d Add RequireSignedInUser() 2022-09-18 15:43:49 +08:00
Mikey
79119760f2
style: golint (#988) 2022-08-09 16:50:49 +08:00
Mikey
2fec3f72ae
fix: check reset phone & email modify rules (#927)
* fix: check reset phone & email modify rules

* Update verification.go

* Update organization.go

Co-authored-by: Yang Luo <hsluoyz@qq.com>
2022-07-30 18:17:13 +08:00
Resulte Lee
bdc5c92ef0
fix: send code missing parameter & show more detail responseError (#910) 2022-07-25 23:46:38 +08:00
leoshine
b9404f14dc
feat: fix bug of using email provider from wrong application (#869) 2022-07-10 00:40:52 +08:00
Resulte Lee
477d386f3c
fix: captcha preview panic when clientId or clientSecret is empty (#824)
* fix: captcha preview panic when clientId or clientSecret is empty

* return original errors from captcha
2022-06-26 22:09:57 +08:00
Resulte Lee
2c57bece39
feat: fix stuck error when no captcha provider found (#808) 2022-06-21 12:22:46 +08:00
Resulte Lee
2e42511bc4
feat: support configurable captcha(reCaptcha & hCaptcha) (#765)
* feat: support configurable captcha(layered architecture)

* refactor & add captcha logo

* rename captcha

* Update authz.go

* Update hcaptcha.go

* Update default.go

* Update recaptcha.go

Co-authored-by: Gucheng <85475922+nomeguy@users.noreply.github.com>
2022-06-18 16:00:31 +08:00
Yixiang Zhao
9f7924a6e0
fix: mask email and phone number on the backend (#563)
* fix: mask email and phone number on the backend

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

* fix: login with masked email or phone

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>

* fix: improve regex

Signed-off-by: Yixiang Zhao <seriouszyx@foxmail.com>
2022-03-15 12:54:57 +08:00
Gucheng Wang
3602d9b9a7 fix: improve error messages 2022-03-07 15:16:09 +08:00
Gucheng Wang
db37f53d6c Update license headers. 2022-02-13 23:39:27 +08:00
Gucheng Wang
c22ab44894 Update import path. 2022-01-20 14:11:46 +08:00
Eng Zer Jun
726e4e3dc1
refactor: move from io/ioutil to io and os packages (#366)
* chore: format code by running `go fmt ./...`

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* refactor: move from io/ioutil to io and os packages

The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-12-13 09:49:43 +08:00
Bingchang Chen
70a550d8bc
feat: login by code (#344)
Signed-off-by: abingcbc <abingcbc626@gmail.com>
2021-12-07 00:05:53 +08:00
Товарищ программист
07fa438348
feat: update swagger api json with tags (#347)
Signed-off-by: Товарищ программист <2962928213@qq.com>
2021-12-03 20:42:36 +08:00
Yixiang Zhao
609e9785e4
fix: some bugs about SMS API (#310)
Signed-off-by: “seriouszyx” <674965440@qq.com>
2021-10-31 08:49:39 +08:00
sh1luo
a4edf47dc4
fix: improvde code logic (#285)
Signed-off-by: sh1luo <690898835@qq.com>
2021-09-04 22:20:47 +08:00
sh1luo
8c66ef6860 fix: improve code specification (#231) 2021-08-14 14:18:08 +08:00
Yang Luo
0c657f0487 Get real IP for verification log. 2021-08-03 22:34:12 +08:00
sh1luo
c632c3c307
fix: replace casdoor with casbin (#194)
Signed-off-by: sh1luo <690898835@qq.com>
2021-07-25 09:34:25 +08:00
Kininaru
d83b86df37 refactor: SessionUser -> SessionUsername
Signed-off-by: Kininaru <shiftregister233@outlook.com>
2021-07-19 10:14:14 +08:00
Yang Luo
2fff5f79ce Can set email title and content now. 2021-05-24 20:21:41 +08:00
Yang Luo
290c5aac9e Add user to VerificationRecord. 2021-05-24 01:18:21 +08:00
Yang Luo
dbf11d61a7 Add sms and email providers to app. 2021-05-24 01:02:38 +08:00
Kininaru
f39378562f feat: turing test before send code
Signed-off-by: Kininaru <shiftregister233@outlook.com>

i18n

i18n

Signed-off-by: Kininaru <shiftregister233@outlook.com>
2021-05-22 21:03:49 +08:00
Kininaru
66d953a6c1 feat: check user email and phone when signing up
Signed-off-by: Kininaru <shiftregister233@outlook.com>

phone prefix error

Signed-off-by: Kininaru <shiftregister233@outlook.com>

fix i18n

Signed-off-by: Kininaru <shiftregister233@outlook.com>

fix i18n error

Signed-off-by: Kininaru <shiftregister233@outlook.com>

removed useless file

Signed-off-by: Kininaru <shiftregister233@outlook.com>

move timeout to app.conf

Signed-off-by: Kininaru <shiftregister233@outlook.com>

i18n

Signed-off-by: Kininaru <shiftregister233@outlook.com>

made verification code reusable

Signed-off-by: Kininaru <shiftregister233@outlook.com>
2021-05-18 22:20:26 +08:00
Yang Luo
947d132362 Refactor out c.RequireSignedIn() 2021-05-17 23:25:28 +08:00
Yang Luo
6508d96162 Remove GetOrganizationByName(). 2021-05-16 22:58:30 +08:00
Yang Luo
b7cbc0e015 Return sms error message. 2021-05-14 18:19:47 +08:00
Kininaru
1589da0a62 fix: check cn phone regex bug and add check to verification code
Signed-off-by: Kininaru <shiftregister233@outlook.com>
2021-05-13 09:55:37 +08:00
Kininaru
892cb39e3e feat: move User.PhonePrefix to Organization.PhonePrefix
Signed-off-by: Kininaru <shiftregister233@outlook.com>
2021-05-13 09:39:07 +08:00
Kininaru
827930a020 feat: add reset phone by verification code
Signed-off-by: Kininaru <shiftregister233@outlook.com>

fixed client bug

Signed-off-by: Kininaru <shiftregister233@outlook.com>

feat: add i18n

Signed-off-by: Kininaru <shiftregister233@outlook.com>

add Casbin License

Signed-off-by: Kininaru <shiftregister233@outlook.com>

removed port from remoteaddr

Signed-off-by: Kininaru <shiftregister233@outlook.com>
2021-05-12 22:59:42 +08:00
Kininaru
400e335e68 feat: add reset email by verification code
Signed-off-by: Kininaru <shiftregister233@outlook.com>
2021-05-12 21:38:31 +08:00