public async Task <string> SocialSignInAsync(socialSignIn signIn)
        {
            if (ModelState.IsValid)
            {
                var token = await TokenManager.GenerateTokenAsync(signIn.email);

                return(JsonConvert.SerializeObject(token));
            }
            else
            {
                return("Invalid state");
            }
        }
示例#2
0
        public async Task <string> SocialSignInAsync(socialSignIn signIn)
        {
            if (ModelState.IsValid)
            {
                // signIn.id=Guid.NewGuid().ToString("N");
                signIn.id = IUserobj.GenerateUserId(signIn.email);
                var token = await TokenManager.GenerateTokenAsync(signIn.email, signIn.name, signIn.id);

                return(JsonConvert.SerializeObject(token));
            }
            else
            {
                return("Invalid state");
            }
        }