Can I authenticate using jwt-gmail api?
google developer : 'https://github.com/googleapis/googleapis/tree/master/google'
It says that only the api at this address can use this method.
But I can not find the gmail api here.
Can the gmail api only use the access token method using oauth 2.0?
I do not know what you mean by jwt-gmail api. That being said.
I think your looking at the wrong library try google-apis-nodejs-clinet.
Gmail api facts normal user gmail accounts can only be accessed using Oauth2 if its a gsuite account then you can use domain wide deligation and user a service account
Related
My chatbot with Microsofts Bot Framework is online and working. It has an API, which is sadly publicly accessible.
But it shouldnt! The API should be secured and only accessible for Microsoft Accounts of my Tenant.
But most of the time the API is accessed by scripts.
Whats the best way to secure?
What is comfortable?
Like other public APIs, your API (your bot) needs to implement some form of user auth in order to validate authorized requests and reject unauthorized requests. Take a look at this sample (the C# version is linked, but the repo has samples in other languages) to see how you can implement user auth using the Microsoft Graph API. In addition to auth, Graph will also allow you to get info about the user, such as their Tenant ID (assuming your user logs-in and grants your bot permission). You can then implement whatever access controls are appropriate for your scenario.
We have a web application where we log users in with Google's auth2.
We also have crone jobs that are used to reply to certain emails through the gmail api.
Is the authorization for signing in and for gmail's api the same? If it is, how can we sign users out of the web app while still authorizing crone jobs?
If what you meant by signing is by using Google+ Sign-in, it says from this documentation:
Why use Google for authentication?
Providing OAuth 2.0 user authentication directly or using Google+
Sign-in reduces your development overhead. It also provides a trusted
and secure login system that's familiar to users, consistent across
devices, and removes the burden of users having to remember another
username and password.
Wherein Gmail uses the OAuth 2.0 protocol for authenticating a Google account and authorizing access to user data. This will be the same.
At a high level, all apps follow the same basic authorization pattern:
During development, register the application in the Google API Console.
When the app launches, request that the user grant access to data in their Google account.
If the user consents, your application requests and receives credentials to access the Gmail API.
Refresh the credentials (if necessary).
The difference is you will need to enable Gmail API for the credentials.
Here's the details for server-side authentication.
I am trying to authenticate user against Azure AD using a web API.We are trying build a SPA and native app for iOS, we are trying to have the API take care of the authentication for us.I looked at this and this and understood that its not possible.
I just want to find out if there is any work around for my scenario.
This question is not a duplicate
#juunas is correct. You want to use something like ADAL to allow the user to authenticate against AAD for access to the Graph API and then use that auth token to access the graph. Microsoft has an example which may be useful to you over here. It's written in objective C, but there are other SPA examples out there if you search for ADAL, SPA, and Graph API.
I'm curious if it's possible to gain access to the Gmail settings of all users within a domain once a user with Admin access authenticates. I know using the Admin SDK, you have access to user settings, however, I'd like to setup email forwarding and it doesn't seem like it's possible without each user authenticating.
You may refer with this SO thread. Before you can call the Gmail API you need to use the service account "JWT flow" in your code to retrieve an OAuth2 credential for the Gmail user you want to access. Here is the documentation. You may also check this related post.
How can I use oauth to make a login System using google cloud Endpoints?
Thanks.
Your question is a little vague, but this is a basic workflow.
Usually the login system is different from the users profile. Authenticate the user using Oauth natively on the client - the authentication will return a profile id. Use that profile id to create a profile for the user on your system.