Sohan Alam
Sohan Alam

Reputation: 529

How to call - Reset User Password by email

when user tries to log in (does sign in) and forgets his password then he tries to reset his password then how does the app call Rest Password by email, since the user has not signed in-ed to Quickblox yet. Doesn't the user need to be signed in to QuickBlox in order to call an API?

Upvotes: 2

Views: 762

Answers (2)

Rubycon
Rubycon

Reputation: 18346

just create session (without user) and reset your password

[QBAuth createSessionWithDelegate:self];

-(void)completedWithResult:(Result *)result{
    if(result.success && [result isKindOfClass:QBAAuthSessionCreationResult.class]){
        //success

        // reset password
        [QBUsers resetUserPasswordWithEmail:@"[email protected]" delegate:self];

    }else if (result.success && [result isKindOfClass:Result.class]){
        // you did it
    }
}

Upvotes: 2

Anton Dyachenko
Anton Dyachenko

Reputation: 56

User can use forget password feature if he can't login the app. So no, user doesn't need to be signed in to QuickBlox in order to call an API.

Upvotes: 1

Related Questions