<@U04UQ68083H> there is a way to redirect the user...
# ory-copilot
c
@chilly-king-10285 there is a way to redirect the user after a social sign-up to add a password ?
c
A message from kapa.ai
Yes, there is a way to redirect the user after a social sign-up to add a password. This can be achieved by using the Ory Kratos self-service flows. After a successful registration, the user is not automatically logged in to prevent Account Enumeration Attacks. However, if these types of attacks aren't your concern, you can add the session hook which will issue a session after successful registration. Here is the configuration you need to add to your
config.yml
file:
Copy code
yaml selfservice:     flows:       registration:         after:           password:             hooks:               - hook: session           oidc:             hooks:               - hook: session # Always enable this for oidc flows or the user experience suffers significantly!
It's very important to add the "session" hook to the after
oidc
registration hooks. Otherwise, your users need to use the login flow again to be able to get a session. For more details, you can refer to the [Ory documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration#successful-registration).
c
@chilly-king-10285 but this will do the login after registration. I am looking more for setting password page after social registration
c
A message from kapa.ai
I'm sorry for the confusion, but based on the provided knowledge sources, there isn't a direct way to redirect users to a "set password" page immediately after social registration with Ory Kratos. The flow for social sign-in with Ory Kratos typically involves the user being authenticated immediately after successful registration, without the need to set a password, as the authentication is handled by the social provider. However, you could potentially customize your application to prompt users to set a password after their first login via social sign-in. This would involve your application logic and is not directly handled by Ory Kratos. For more details on how Ory Kratos handles social sign-in and registration, you can refer to the [Ory documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-registration#successful-registration).