How can I sign in to Google inside a Chrome Extension browser_action? - google-chrome-extension

I’m trying to keep this as simple as possible so that it can be a resource for other people in the same situation.
How can I sign in inside of a chrome extension, which is not a hosted web server?
I seem to get an error “Invalid Cookie Policy” whether I use both the button approach or gapi.load(‘auth2’) followed by gapi.auth2.init(), regardless of including client_id in <meta>, manifest.json, and init
If anyone can get it working (sign in and id_token, not the auth token), please leave an answer!
Thank you

I have followed this tutorial from official Chrome Documentation and had no problem

Related

Publishing UWP App with Edge and Chrome extension

for a my UWP App I have created an extension for Edge and Chrome.
I have tried to create a new submission to the store but I have received the following errors:
com.microsoft.edge.extension is a reserved extension type. Your app does not have permission to use this extension type. To request permission, please use our extension submission form: https://aka.ms/extension-request
Your developer account doesn’t have permission to submit apps converted with the Desktop Bridge at this time. https://aka.ms/desktopbridgeforwindowsstore
I have fill the module at https://aka.ms/extension-request and at https://aka.ms/desktopbridgeforwindowsstore but, after 1 month, I didn't received any response.
Somebody know what I have to do in order to continue with the submission?
Does somebody have any experiences on that?
P.S.: I have sent a post at the MSDN forum and I have asked support at the Microsoft Answers but anybody was able to help me on that.
Thank you,
Regards,
MatVic

Can't register new Client ID on Instagram developers page

I can't register new client because always have a wrong captcha, I tried to create it with different browsers but same effect :(
The captcha solution was not correct. Please try again.
I used the Content-Security-Policy extension for chrome.
https://github.com/PhilGrayson/chrome-csp-disable
Then the field appeared -> New App Created.
The form is broken.
I've been trying it on and off for the last two weeks, also with different browsers, it doesn't work.
I have exactly the same problem when trying to create an client ID. I've send in a ticket for a solution.
you can see my answer there you have to install google chrome extension and then don't forgot to disable the Content-security policy
https://chrome.google.com/webstore/detail/disable-content-security/ieelmcmcagommplceebfedjlakkhpden
you see here too
https://stackoverflow.com/a/53188447/5889990

Must a freelancer keep API Client IDs active for former employers?

I'm a newb with Google OAuth and am trying to understand the different business/application models and which API credential types go with my particular situation.
I am creating a Chrome extension for someone for their own private use which accesses their Google Sheets docs using their personal Sheets account. So, I will not own the code or extension once I deliver it to them and end the contract. So, I do not want to have to maintain any authorization/API ID's or credentials after I deliver the extension and its source code. But, obviously, the extension must continue to work for them indefinitely.
The only way I can see how to accomplish this is to instruct the employer (who has no developer or development skills) on how to create the OAuth Client ID with their own Google API developer console. Then, they can enter the client ID and other codes if necessary into the extension config screen so the extension can use this information for authorizing API calls. This seems like a huge hassle for someone who just wants to buy an extension to do something simple.
Am I missing something? Is there an easier way?
P.S. I know this question doesn't follow the proper format for SO, but this is the only place Google has provided for asking API OAuth 2.0 questions.

Instagram Api: Client is no longer active

Yesterday, I was doing some test with Instagram API. I want to design a web page where I show the lastest photos in our account (Some like social feed). Today, I'm recieving this error: "The client used for authentication is no longer active.".
Somebody knows if I did some wrong working with your API and How can I do to fix this problem.
Best regards.
Thanks.
I'm running into similar issues. Have not been able to successfully pull anything through the API for over 12 hours.
Check out this link for quick API testing:
http://instagram.com/developer/api-console/
Nothing seems to work.

How do I get an access token from Microsoft Graph API?

I'm currently dealing with the fascinatingly confusing world of Microsoft. I've read several of the half-baked tutorials on how to use their Graph API and Office 365 API and I still don't really know what to do. What I HAVE figure out is how to build that authorization request URL so I can get the "code", which is supposed to be used to then get the access token. I've done this with the Google API and it works beautifully, but not with the Microsoft Graph API. Here's what I have:
https://login.microsoftonline.com/common/oauth2/authorize?client_id=123451234512345&response_type=code&redirect_uri=https://www.my-site.com/oauth-callback/microsoft
When the user clicks on this link, they are taken to the Microsoft login page. So far, so good. But, after entering my login credentials it just takes me right back to the same Microsoft login page, as opposed to redirecting the user to my redirect uri. I have an Azure account with the same redirect URI specified, but it just isn't working. What am I doing wrong? By the way, I'm using node.js. Any links to useful tutorials would be much appreciated.
To get a code you need to pass the following parameters:
response_type=code
client_id=yourClientId
redirect_uri=yourRedirectUri
resource=https://graph.microsoft.com
For example:
https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&client_id=12334&redirect_uri=https://myapp.com&resource=https://graph.microsoft.com
Finally, thank you for the feedback, can you please point the articles you read where the information was not clear so we can make sure to update them? I suggest you try the following article: https://graph.microsoft.io/docs/platform/rest
This is a great video explaining the login process: https://www.youtube.com/watch?v=HOcwvuIJHXA "Deep Dive into the Office 365 RESTful APIs". It is very long, but detailed. Around 25:00 it shows with Fiddler how the login works. Helped me a lot.

Resources