For my app I\'m implementing the same security as shown in the zentask.
public class Secured extends Authenticator {
@Override
public String getUsername(Context
I would recommend to have one module which will generate session ids for you. In this module you can have some method like createSessionId() or something. Logic of generating session Id you keep in this method.
I would create session ID as a combination of (userId + providerId(Facebook/Google-in case of OAuth/UsernamePassword/Any Provider) + current timestamp + UUID) and after creating this session Id, I will encrypt it with some algorithm. This will give me session Id
Advantage with this would be :