Hi Ruwan, Thanks for the input, however even if I used localClaim it's also a null value in this scenario. Furthermore, AFAIU the username value becoming null is an issue here. Please correct me if I'm wrong.
Thanks, Sameera On Tue, Oct 22, 2019 at 11:53 AM Ruwan Abeykoon <[email protected]> wrote: > Hi Sameera, > Best practice is to use local claims, which is translated to local dialect > as much as possible. > > Cheers, > Ruwan A > > On Tue, Oct 22, 2019 at 10:45 AM Sameera Wickramasekara <[email protected]> > wrote: > >> Hi Devs, >> >> I am using an adaptive authentication script similar to one below in a >> federated authentication flow. >> >> >> >> *function onLoginRequest(context) { executeStep(1, { onSuccess: >> function (context) {* >> * var user = context.currentKnownSubject* >> * var userClaim = >> user.remoteClaims["http://wso2.org/claims/email >> <http://wso2.org/claims/email>"];* >> * Log.info("Username"+ user.username);* >> * Log.info("Email"+ userClaim);* >> >> >> * } });}* >> >> When the user signs in through the federated IDP everything works as >> expected. The issue happens if somehow the user invokes the* >> /oauth2/authorize >> *endpoint again (without revoking the user session in IS side) to >> initiate the login flow. Then the user claims and username are printed as >> *null* values. >> >> I am using an updated IS 5.8.0 pack. Appreciate any insight into the >> issue and a way to solve this. >> >> Thanks, >> Sameera >> -- >> *Sameera Wickramasekara* >> Senior Software Engineer >> WSO2 >> lean . enterprise . middleware >> Mobile : +94(0) 714652035 >> <https://wso2.com/signature> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> > > > -- *Sameera Wickramasekara* Senior Software Engineer WSO2 lean . enterprise . middleware Mobile : +94(0) 714652035 <https://wso2.com/signature>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
