"User Authentication" Chome App Tutorial Page - google-chrome-extension

Trying to follow this intro to user authentication using OAuth 2.0 in a Chrome Extension I am developing. https://developer.chrome.com/apps/app_identity
But I can't follow it (missing information).
Add permissions and upload app
You need to make sure the identity permission is in your manifest. You can
then upload your app to the apps and extensions management page (see Publish).
This step is fine. I have uploaded my project and it is in the developer dashboard.
Copy key to your manifest
When you register your application in the Google OAuth console, you'll provide your application's ID, which will be checked during token requests. Therefore it's important to have a consistent application ID during development.
To keep your application ID constant, you need to copy the key in the installed manifest.json to your source manifest. It's not the most graceful task, but here's how it goes:
1.Go to your user data directory. Example on MacOs: ~/Library/Application\ Support/Google/Chrome/Default/Extensions
2.List the installed apps and extensions and match your app ID on the apps and extensions management page to the same ID here.
3.Go to the installed app directory (this will be a version within the app ID).
4.Open the installed manifest.json (pico is a quick way to open the file).
5.Copy the "key" in the installed manifest.json and paste it into your app's source manifest file.
Except, straight away, at step 1, I cannot progress. My app is not installed and therefore its ID does not appear in the user data directory.
Will installing the unpacked extension work? Well it doesn't appear in Default/Extensions directory so I guess not. Besides, it has been given a different ID than my dashboard instance.
Therefore, where do I get the key? There is a key associated with my app on the developer dashboard. But this "tutorial" doesn't mention that.
Is somebody able to explain what I should be doing such as pointing me to another resource to learn how to set up a basic user authentication for a Chrome App?

After uploading, from the developer dashboard you can click on the "More Info" on the right of your extension in the dashboard.
You will see several pieces of useful data:
item id - this is the extension id
public key - this is the "key" you want. Copy everything between (not including) the "BEGIN PUBLIC KEY" and "END PUBLIC KEY" markers, and paste it into a "key" property in your manifest.json

Here's one way to solve this:
In the Chrome Developer Dashboard, edit your current project.
Scroll down and click Preview Changes
Click the Share icon button next to Add To Chrome which is grayed out.
E-mail the link to yourself.
Follow the link to your app's store page and now you should be able to click Add To Chrome. It will then be installed on your system under [profile]/Extensions.

Related

Can I remove default scopes added by Google Workspace Marketplace SDK configuration?

I am trying to publish a Google Sheets Add-on. I am working on the Google Workspace Marketplace SDK configuration. The configuration automatically includes the following 2 scopes as defaults:
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/userinfo.profile
The Add-on has no reason to access the user's email or profile. Why are these added? Can I delete them? The only scopes that the script code should need are:
https://www.googleapis.com/auth/script.container.ui
https://www.googleapis.com/auth/spreadsheets.currentonly
When I go to create the OAuth Consent Screen. I am told that I need to create "A Youtube video showing how you plan to use the Google user data that you get from scopes". Am I being asked to do this because of these default scopes that are included?
EDIT: I deleted these 2 scopes and did a SAVE. It confirmed that the edits were saved. But when I refreshed the page, the scopes were back!
The reason why the Trust and Safety team is asking you for the video is because this:
1-Most of the apps that will be public, require certain steps. So the video is one of those.
2-Now, the main reason for the video, is because the scope https://www.googleapis.com/auth/script.container.ui is part of the restricted scopes. And according to the documentation it needs to go through the verification.
So basically the reason for the video is because you have a restricted scope because this scope allows you to display and run third-party web content in prompts and sidebars inside Google applications. Therefore, it is important for the verification process.
Now in regards to your concern of the default scopes, I was able to remove them and create OAuth consent screen without them.

How to customize elements of the Azure AD B2C page while still using Azure's template

My business has the requirement of doing below changes while still using Azure blue template in Azure B2C's login page. Can someone point me in the right direction on how to achieve this?
B2C login page
If you need styling customization you need to go with your own template. If you want to be as close to the default one provided then you need to download it, change and use as your custom one. To do that just open Developer Tools in the browser, open your user flow and find something similar to this (image below) in the Network tab of Developer Tools:
Just double click it and the new page with template used with your flow will open. Just save it as HTML and you are free to go. Don't forget about checking any extenal references (CSS, JS, etc). Depending on what will you be changing you might want to download them and host on your own as well.

how to delete "google sign in account" for development purpose - actions on google

I'm working with actions on google and dialogflow, and recently they proposed google signin to make account linking fast without writing own oauth server.
Today I implemented their google signin in my dialogflow app it is working quite fine but unfortunately I am unable to delete that account to check all development aspects, I tried my other google accounts and my friends account but soon ended up out of accounts
Un other methods when i enable and disable testing it forget about linking but in google signin it is tightly stick with the account, and i have tried almost everything i can try like restarting my phone and clearing cache of chrome browser but it looks like it is saving account somewhere in cloud.
What i need to do is, when i sign in first time it ask for name permission, i need that screen again and again for testing something
Google calls this Removing a Website or App that has access to your account. It is done using the myaccount.google.com console.
If you want to do this using Android, the easiest way is to:
Open your device's Settings app Settings app and then Google and then Google Account.
At the top, tap Security.
Under "Signing in to other sites," tap Signing in with Google.
Tap the name of your project.
Choose Remove access.
Through the web, you can go to Apps With Access to your Accounts:
Scroll down to the "Signing in with Google" section
Locate your project.
Select it, and choose "Remove access"
The name that is shown should be the name you've given to your project as part of the OAuth screen. If you haven't set that up (and if you're just playing around, you probably haven't), it will use the Project ID for your project. You can find this on the Cloud Console home screen attached to the same project name that you used in Dialogflow and the Action Console.
While you're in there, you will probably want to configure the OAuth screen to have a name for the app as it will be visible to users on the OAuth screen. From the menu, select "APIs & Services" and then "Credentials"
Select the "OAuth consent screen" tab, and fill in the "Application name".
This name should then be in the list of applications you have installed, and can remove.

Sign in to Azure Account from VS Code

I have the latest version of Visual Studio Code 1.19.2. It's a clean installation.
I've installed Azure Extension Pack from Microsoft with Azure Account (0.2.2). But I am not able to sign in to my Azure subscription. When I type Azure: Sign In in the commands pallete (CTRL+Shift+P), it only shows Azure: Logging in... in the bottom purple line, but nothing happens. I am not signed in.
As far as I know it should open browser window with login screen, but it does not. My default browser is Edge, my operating system is Windows 10 Enterprise x64 1709 with all updates.
How to sign in to my Azure subscription?
For me I just copied the Azure tenant ID from the portal: Go to ActiveDirectoy in Azure then go to properties you'll see the tenant ID.
Now just paste the tenant ID in vscode: File->Preferences->Settings, then search for keyword "tenant" and add your Azure tenant id.
It happens because your corporate network has blocked the proxy to execute the Azure: SignIn command. So the solution is to add value HTTPS_PROXY in the environment variable to allow the web browser to open up the Azure Sign in the login page.
export HTTPS_PROXY=http://username:password#proxy:8080
export HTTP_PROXY=http://username:password#proxy:8080
Can you see this strip pop out?
Edit: if not install Azure Tools For VScode
only after clicking "Sign in" you should get a browser window open where you have to paste the code.
For me I was confused by the message, it copies the code to your clipboard automatically, I'm just dumb..
I also had this issue and was rectified by changing my default browser from Edge to Chrome. Signing in via Chrome worked whereas Edge signed in successfully in browser but not reflected in VS Code.
Upgrade the VS Code to the latest version, Also ensure environment variable contains the necessary http proxy. No need to change the default browser

"Napa" office app launching access required

I'm developing Excel online apps using "Napa" Development Tool, using a newly registered account, currently in my 30 days free trial phase.
When I was trying to create an task pane app for Office on my Sharepoint page, I successfully created a project, and I was able to edit the code inside the online code editor.
When I was trying to run the project, by clicking on the "Run" icon on the left menu bar
,
the pop-ed up dialog indicates that the app was deployed on the website.
But, when I clicked on the link and it opens up a new browser tab, in which the webpage told me that I don't have access to that page.
Anyone knows what's going on here?
Also, it's not just that the Task pane apps are not working. I tried to create App for Sharepoint, Content app for Office, Task pane app for Office, and all of them don't work, telling me that I don't have access on the page when I tried to run them.
Found the answer.
In the page indicating access required, post a new message and require access to the site.
And then in your own sharepoint.com site, edit the site and grant access to that specific message, then we can have the access to the app.

Resources