Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Commit

Permalink
fix login Account bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Xuancaosu committed Sep 24, 2021
1 parent d534370 commit 9993390
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,8 @@ export const PasswordLoginForm = forwardRef<
{
account: identity,
password: await encrypt!(password, publicKey),
options: {
captchaCode,
customData: getUserRegisterParams(),
},
captchaCode,
customData: getUserRegisterParams(),
autoRegister: autoRegister,
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ requestClient.get = async <T>(
})}`,
{
...init,
credentials: 'include',
headers: {
...init?.headers,
[requestClient.langHeader]: i18n.language,
Expand All @@ -43,6 +44,7 @@ requestClient.post = async <T>(
const res = await fetch(`${requestClient.baseUrl}${path}`, {
method: 'POST',
body: JSON.stringify(data),
credentials: 'include',
headers: {
...config?.headers,
'Content-Type': 'application/json',
Expand All @@ -56,7 +58,6 @@ requestClient.baseUrl = ''
requestClient.setBaseUrl = (base: string) => {
requestClient.baseUrl = base.replace(/\/$/, '')
}

const DEFAULT_LANG_HEADER = 'x-authing-lang'
requestClient.langHeader = DEFAULT_LANG_HEADER
requestClient.setLangHeader = (key: string | undefined) => {
Expand Down

0 comments on commit 9993390

Please sign in to comment.