Differentiate between apps

Hi i have 2 react native apps hitting same keycloak, But i want to differentiate which app has sent request is there any way to send app name in query params or something?

Use two different Client configurations. Then you can send the clientId for each app. This is the standard practice when you are using multiple apps with the same realm.

Thank you, @xgp . I have two apps: a customer app and a store app. I want to implement a system where if a user registers through the customer app, they cannot register in the store app, and vice versa. We have separate client configurations for each app. How can we differentiate between users to enforce this restriction?

What you’re describing isn’t SSO from the same user pool. If you want 2 separate pools of users, each with access to different applications, use 2 separate Realms.

There is an extension that will allow you to do it in 1 Realm, which is very well done, but IMO the idea sort of misses the point of SSO.

The thing i want to set default role while registering

in customer app: Role => customer
in store app: Role=> manager

Can we set default role to customer for customer app and admin for store app ? using role mapping with react native?