Wire up required actions correctly
This commit is contained in:
parent
f99d069d61
commit
ad8aa8a5ba
@ -56,15 +56,12 @@ for email in emails:
|
|||||||
"realmRoles": [
|
"realmRoles": [
|
||||||
"user_default",
|
"user_default",
|
||||||
],
|
],
|
||||||
|
"requiredActions": ["UPDATE_PASSWORD", "UPDATE_PROFILE"],
|
||||||
}
|
}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
user_id = keycloak.create_user(payload, exist_ok=False)
|
user_id = keycloak.create_user(payload, exist_ok=False)
|
||||||
print(f"Account created for {email}")
|
print(f"Account created for {email}")
|
||||||
keycloak.send_update_account(
|
|
||||||
user_id=user_id, payload=json.dumps(["UPDATE_PASSWORD", "UPDATE_PROFILE"])
|
|
||||||
)
|
|
||||||
print(f"UPDATE_PASSWORD/PROFILE actions set for {email}")
|
|
||||||
keycloak.send_verify_email(user_id=user_id)
|
keycloak.send_verify_email(user_id=user_id)
|
||||||
print(f"Verification mail sent to {email}")
|
print(f"Verification mail sent to {email}")
|
||||||
except Exception as exception:
|
except Exception as exception:
|
||||||
|
Loading…
Reference in New Issue
Block a user