The app should:
create new profile with email or Google Sign-In or Facebook Login
after creating the profile there is an email verification and then the user can sign in
if is the first time it should show a page to create a new in-app profile (creating a document in the database with the uid of the user with description, skills...)
but in this page if the user Google Sign-In it should show name and surname and the Google profile picture and let them add additional info such as description and their skills...
The first 2 steps are easy to achieve but how can I understand if the user just created the profile or he just logged out and in again or he simply uses Google Sign-In every time. And how can I take the user info from the database in Firebase and show it in the create in-app profile page.
Is it possible to achieve in SwiftUI?
Thanks!
To detect is a signed-in user is new, you can compare lastSignInDate and creationDate in the UserMetadata object.
Also see:
Get Created date and last login date from FIRUser with Firebase 3
iOS/Swift/Firebase Authentication: Help Needed on Accessing "isNewUser", which shows the isNewUser that you can also sometimes use (depending on your implementation).
Related
I was trying to integrate google authentication in my web app to get the user's date of birth info from google people's API, for thatI have defined it in the scope. When the user gets redirected to google login I am getting the screen where the user has to select the date of birth checkbox manually and allow it for authentication (Screenshot is attached for reference). I want it to be automatically selected as shown in the second screenshot. Any leads is highly appreciated .
Thanks in advance.
Screenshot depicting the manual checkbox
Screenshot depicting the flow which I want to implement
I am working on login system where user is logged to website using google plus api . I am hitting "me" endpoint after token verification .But I am facing a problem in some cases where I don't get the displayName/Name object of the user .
scopes used : plus.profile and plus.login
Endpint hit : "me"
$service=new Google_Service_Plus($client);
$userinfo=$service->people->get('me');
I want to fetch the username of the user .
Google+ Sign-In provides support for all users with a Google account, even if they have not yet created a Google+ profile. Your app can either prompt those users to create a Google+ profile (by using the https://www.googleapis.com/auth/plus.login scope) or not (by using the profile scope)
Switch to Google+ Sign-In
If you use the https://www.googleapis.com/auth/plus.login scope, users are guaranteed to have a Google+ profile.
If you want to bring information about the profile (Names) and Email.
I'd recommed you add the follow scopes separated by two spaces:
profile email
profile bring the Names (givenName, familyName, etc.) and email bring the email.
Not sure if this is possible or if anyone has managed to do this. I have user with super admin access, with which I can create a new user for my domain. However I also want to add a couple of calenders to the created user's calendar list. When I create a user I authenticate using my super admin, but then I can't add a calendar to the user's calendar list since I am not logged in as the user. Is it possible to do this as the super admin, or do I have to logout and authenticate as the created user in order to add calendars to their list? This is the base url to which the post request is made:
https://www.googleapis.com/calendar/v3/users/me/calendarList
in the place of me could I pass in the id of the user? I couldn't find any parameter in the documentation with which I can specify the user to whose list I want to add a calender.
Thanks
Two options:
Each user much login to google calendar and share thier calendar to a single user. You can then use this account to update their calendars. Note that google has limitations to how many calendars and request you are allowed before the account goes to read-only mode.
Buy a google apps domain (5$per user per month) and create a service account at console.developers.google.com. Create a project and give it domain wide delgation at admin.google.com. In Apps engine you should be able to give access for admin to modify all users calendars.
No matter what case you choose, you also need to enable CalendarAPI at dev console site. Now with private key created from website request OAuth2 access token, where sub field is set for the users that you want to change calendar for. With returned access token use CalendarAPI to modify calendar.
Sry for bad english and short description, i'm in a hurry. /conner ;)
In the site I develop, users can login to my website using facebook/google login.. Once the user login I want to prompt the user to update his profile with mobile number and verify it. In the backend I keep a field in DB which says whether the mobile number is verified or not.
So if the mobile number is not verified; for every login I want to prompt the user.
I tried profile completeness/force complete profile.. But couldnt achieve what I needed..
Any help appreciated..
After clicking Add it now button we need to display the domain users. How to display the user list in Java
Thanks
This is what you are looking for :
https://developers.google.com/google-apps/profiles/
The Profiles Data API allows client applications to retrieve and
update profile information for users in a Google Apps domain. Each
user profile is stored in the owning user's Google Account, but it can
be modified only by an administrator of the user's domain.