I just want to get the created date and the last sign in date of a user with firebase, my plan is to let user login with Facebook and then signup and add new information and
In FIRUserMetadata your can find both properties:
/** @property creationDate
@brief Stores the creation date for the corresponding Firebase user.
*/
@property (copy, nonatomic, readonly, nullable) NSDate *creationDate;
to access this property use
let creationDate = Auth.auth().currentUser?.metadata.creationDate
/** @property lastSignInDate
@brief Stores the last sign in date for the corresponding Firebase user.
*/
@property (copy, nonatomic, readonly, nullable) NSDate *lastSignInDate;
to access this property use
let lastSignInDate = Auth.auth().currentUser?.metadata.lastSignInDate