fix: redirect url just use slash

This commit is contained in:
Fu Zi Xiang 2023-11-22 16:40:10 +08:00
parent 2da1582568
commit 47e49dc2dd
No known key found for this signature in database
1 changed files with 1 additions and 10 deletions

View File

@ -214,7 +214,6 @@ pub async fn login_refresh_handler(
// sign up if not exist
pub async fn login_handler(
State(state): State<AppState>,
header_map: HeaderMap,
jar: CookieJar,
Form(param): Form<WebApiLoginRequest>,
) -> Result<(CookieJar, HeaderMap, WebApiResponse<()>), WebApiError<'static>> {
@ -241,15 +240,7 @@ pub async fn login_handler(
("invalid_grant", Some("Invalid login credentials")) => {
let sign_up_res = state
.gotrue_client
.sign_up_with_referrer(
&param.email,
&param.password,
Some(&get_header_value_or_default(
&header_map,
"host",
"localhost",
)),
)
.sign_up_with_referrer(&param.email, &param.password, Some("/"))
.await;
match sign_up_res {