Dev (#2548)
* fix(chalice): fixed Math-operators validation refactor(chalice): search for sessions that have events for heatmaps * refactor(chalice): search for sessions that have at least 1 location event for heatmaps * fix(chalice): fixed Math-operators validation refactor(chalice): search for sessions that have events for heatmaps * refactor(chalice): search for sessions that have at least 1 location event for heatmaps * feat(chalice): autocomplete return top 10 with stats * fix(chalice): fixed autocomplete top 10 meta-filters * refactor(chalice): refactored logout * fix(chalice): fixed signup scope & tokens
This commit is contained in:
parent
e96416d1e6
commit
e628d1ac2f
4 changed files with 15 additions and 15 deletions
|
|
@ -80,11 +80,14 @@ async def create_tenant(data: schemas.UserSignupSchema):
|
|||
r["smtp"] = smtp.has_smtp()
|
||||
|
||||
return {
|
||||
'jwt': r.pop('jwt'),
|
||||
'refreshToken': r.pop('refreshToken'),
|
||||
'refreshTokenMaxAge': r.pop('refreshTokenMaxAge'),
|
||||
"jwt": r.pop("jwt"),
|
||||
"refreshToken": r.pop("refreshToken"),
|
||||
"refreshTokenMaxAge": r.pop("refreshTokenMaxAge"),
|
||||
"spotJwt": r.pop("spotJwt"),
|
||||
"spotRefreshToken": r.pop("spotRefreshToken"),
|
||||
"spotRefreshTokenMaxAge": r.pop("spotRefreshTokenMaxAge"),
|
||||
'data': {
|
||||
"scope": "full",
|
||||
"scopeState": 0,
|
||||
"user": r
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,10 +44,7 @@ if not tenants.tenants_exists_sync(use_pool=False):
|
|||
content = await signup.create_tenant(data)
|
||||
if "errors" in content:
|
||||
return content
|
||||
refresh_token = content.pop("refreshToken")
|
||||
refresh_token_max_age = content.pop("refreshTokenMaxAge")
|
||||
response.set_cookie(key="refreshToken", value=refresh_token, path=COOKIE_PATH,
|
||||
max_age=refresh_token_max_age, secure=True, httponly=True)
|
||||
content = __process_authentication_response(response=response, data=content)
|
||||
return content
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -90,9 +90,12 @@ async def create_tenant(data: schemas.UserSignupSchema):
|
|||
r["smtp"] = smtp.has_smtp()
|
||||
|
||||
return {
|
||||
'jwt': r.pop('jwt'),
|
||||
'refreshToken': r.pop('refreshToken'),
|
||||
'refreshTokenMaxAge': r.pop('refreshTokenMaxAge'),
|
||||
"jwt": r.pop("jwt"),
|
||||
"refreshToken": r.pop("refreshToken"),
|
||||
"refreshTokenMaxAge": r.pop("refreshTokenMaxAge"),
|
||||
"spotJwt": r.pop("spotJwt"),
|
||||
"spotRefreshToken": r.pop("spotRefreshToken"),
|
||||
"spotRefreshTokenMaxAge": r.pop("spotRefreshTokenMaxAge"),
|
||||
'data': {
|
||||
"scope": "full",
|
||||
"user": r
|
||||
|
|
|
|||
|
|
@ -48,10 +48,7 @@ if config("MULTI_TENANTS", cast=bool, default=False) or not tenants.tenants_exis
|
|||
content = await signup.create_tenant(data)
|
||||
if "errors" in content:
|
||||
return content
|
||||
refresh_token = content.pop("refreshToken")
|
||||
refresh_token_max_age = content.pop("refreshTokenMaxAge")
|
||||
response.set_cookie(key="refreshToken", value=refresh_token, path=COOKIE_PATH,
|
||||
max_age=refresh_token_max_age, secure=True, httponly=True)
|
||||
content = __process_authentication_response(response=response, data=content)
|
||||
return content
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue