Google Oauth in chrome extension v3 - google-chrome-extension

Using https://accounts.google.com/gsi/client in script tag.
Sign in popup is not showing user accounts.
Error : The given origin is not allowed for the given client ID.
Any recent guide to implement "Signin with google"
or solution to the above error.

Related

Selenium automate firebase google sign in process

I am trying to login firebase google sign in using selenium web driver. But I am getting the following error when enter email and click next button:
**Couldn't sign you in**
This browser or app may not be secure.
Try using a different browser. If you’re already using a supported browser, you can refresh your screen and try again to sign in.
// Redirected to reject url
https://accounts.google.com/signin/oauth/deniedsigninrejected?
I used chrome browser and chrome driver version 79.0.3945.79.
Any help would be appreciated.
The problem is you provide email to sign in which didn't access this firebase.
May be not the best solution.But it works best for me.
Provide email to sign in should be the owner email, which is used to specify who can full acess firebase. So, it works property when you use owner email.

How to get instagram access token for app in sandbox mode

Currently when using instagram access token by the url "https://www.instagram.com/oauth/authorize/?client_id=[id]&redirect_uri=http://localhost:3000&response_type=token&scope=public_content" I have such an error
"This request requires scope=public_content, but this access token is not authorized with this scope. The user must re-authorize your application with scope=public_content to be granted this permissions."
I observed the internet and found that scope query part should be added to the end of API URL. That is how I constructed my url. But as you see it resulted in error.
I tried to find out the reason on app permissions page. There is a button "Start submission". I clicked it and got the list of radio buttons. But when I clicked on " I want to display my Instagram posts on my website." then I got:
You do not need to submit for review for this use case. If you are a developer and you want to display Instagram content on your website, then you do not need to submit your app for review. By using a client in sandbox mode, you can still access the last 20 media of any sandbox user that grants you permission.
So I finally got lost. Looks like the solution is pretty simple because in instafeed.js plugin no more information is provided. But I can not resolve it by myself.
change your scope to basic should work.
The link has 'public_content'
https://www.instagram.com/oauth/authorize/?client_id=&redirect_uri=http://localhost:5000&response_type=token&scope=basic

Incorrect redirect URL address while working with Microsoft Graph API

I am working on Microsoft graph API for implementing the Email functionality.
The source code is referred from the official microsoftgraph github account.
I am following the step mentioned here
On this Step I supposed to get a code in redirect URL address.
I suppose to get below url as mentioned in the steps.
https://login.microsoftonline.com/common/oauth2/nativeclient?code={IAQABAAIAAABHh4kmS_aKT5XrjzxRAtHz5S...p7OoAFPmGPqIq-1_bMCAA}&session_state=dd64ce71-4424-494b-8818-be9a99ca0798
instead of that I am getting below url
https://login.microsoftonline.com/a1f1e214-xxxx-xxxx-xxxxxx-xxxxxxxx59641/oauth2/v2.0/authorize?response_type=code&client_id=xxxxxxx-1xxxx-xxxx-ad2a-d80d3f51638a&redirect_uri=https%3A%2F%2Flogin.microsoftonline.com%2Fcommon%2Foauth2%2Fnativeclient&scope=Files.ReadWrite%20openid%20User.Read%20Mail.Send%20Mail.ReadWrite
Note: The Above step is highligted in the documentation
Is this because I dont have check the box checked next to oauth2/nativeclient which is mention at Step 4 Point 8 in the documentation.
Any guidance will be great help
The command line interface opens a browser window on the Azure Active
Directory authorization endpoint. Enter your user name and password to
authenticate. When you are authenticated, you're taken to an
authorization window for the sample app. Review and accept the scopes
requested by the sample app. Click the Ok button on the authorization
window.
When you got that url, you should be asked to login. After that, you will get the code.
The steps:
Register an app on Azure portal->get the client id-> go to Constants.java class and replace the client_id with yours.
Run the PublicClient class.
Login in with your account, then you will get the code.

Not Able to provide language support in b2c Custom policies using localization

I am using custom policies to enable mobile number authentication in my mobile app.
I have used custom UI files to manage the UI of the policies using blob storage as given in the following link:
https://learn.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-ui-customization-custom
Now i want to give support to Chinese language for sign in, sign up and password reset policy. for that i am following Microsoft document :
https://learn.microsoft.com/bs-latn-ba/azure/active-directory-b2c/localization#set-up-localization
along with some reference document i found on git:
https://github.com/Azure-Samples/active-directory-b2c-advanced-policies/blob/master/Migration-JIT-sample/B2C_1A_Demo_Base.xml
FYI,
I have used this MS link to get started with custom policies:
https://learn.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-get-started-custom
but i wanted mobile authentication instead of email so i made changes as given in this stackoverflow link:
Can Azure-AD B2C use a mobile telephone number as a username?
i am following the exact steps given in the document but when i run the policy it gives me the error as :
One of the request inputs is out of range.
after following the steps it generates url like this:
https://smarthomestgdev.blob.core.windows.net/en/b2cpagelayout/signup.html
the url is correct but it does not render any sign up page and gives blank page.
Can anyone help me solving the issue?

Does Instagram Graph API has sandbox mode?

The docs say (step 4):
In the App Review for Instagram section, click Add to Submission for each permission your App will need from its Users. instagram_basic is required. instagram_manage_comments, instagram_manage_insights, and instagram_content_publish are optional.
Scroll to the bottom of the page, and in the Current Submission sub-section, for each submission, click its View Notes link.
In the View Notes dialogue for each permission submission, provide a description for how you will use the data returned by any endpoints that require the permission, and a screencast showing how your app will use the data.
Once you've completed your notes for all of your permission submissions, click the Submit For Review button at the bottom of the page. Note that this is separate from your App Review, which you will do after testing.
After you've added both Facebook Login and Instagram API products to your app configuration, add Facebook Login to your app and record a screencast showing how you will use data returned by the Instagram API. This is similar to the Facebook Login screencast but with Instagram data, so the same guidelines apply.
Step 5:
Once you've been notified that your Instagram API product submission has been approved, you can use the Graph API Explorer to test your app.
With Facebook Login I can create an app that works in sandbox mode. Which lets me create a screencast. To be able to use Instagram Graph API (on a site) I need (from what I can gather):
Facebook Page linked to Instagram Business Account
an app icon
a privacy policy page
a site with working Facebook Login
description of how each permission is going to be used
screencast of... what exactly? of a site that is basically ready, but instead of fetching data from Instagram, it has them hardcoded in the code?
Or there is a sandbox mode after all?
UPD I've highlighted the important parts in the quotes above. Then:
5. Test Your App
Once you've been notified that your Instagram API product submission has been approved, you can use the Graph API Explorer to test your app.
Go to the Graph API Explorer...
The first call you will make is to the Graph API's /user/accounts edge...
Locate the Page that you connected to the Instagram Business Account and click its ID...
Next, [make /page?fields=instagram_business_account request].
This is where I get empty response in Graph API Explorer (only id field is returned), or:
200:- OAuthException:(#200) Access to this data is temporarily disabled for non-active apps or apps that have not recently accessed this data due to changes we are making to the Facebook Platform. https://developers.facebook.com/status/issues/205942813488872/
GET /...?fields=instagram_business_account HTTP/1.1
on my site. Which requests to Instagram Graph API can I make before passing reviews (Instagram App Review, and Facebook App Review)?
It looks like the documentation that Facebook provides is somewhat misleading. You can actually use Instagram Graph API via Graph API Explorer (or by sending GET requests from your code) in a very limited way accessing only your instagram business account BEFORE you get initial approval described in Step 4.
Steps:
Open Graph API Explorer.
First, you need to add extra permissions in the "Access Token" section. There is a "Add a Permission" drop down on the bottom of that section. Open that drop down and select: instagram_basic, manage_pages, business_management permissions. Depending on what you are trying to do, you may need other permissions as well (e.g. instagram_manage_comments, ads_management, manage_pages).
Once you selected the extra permissions, click on the "Get Access Token" button.
Now, you have access token with correct permissions and you should be able to execute instagram_business_account request. This will return the instagram id of your business account, which you can then use for other requests.
After going through these steps, I'm able to get media for my business account via Instagram Graph API, although I'm still trying to figure out why tags request returns empty list.
Go to your app dashboard from your developer account:
https://developers.facebook.com/apps/APP_ID/dashboad
Go to: Roles -> Test Users.
Edit one of the test users to change its password to what you want in order to know him.
Once done, logout from your personal account and connect with the "test user" account in https://facebook.com
Go to your app and click the facebook login with the scope "instagram_basic".
With the access_token that you get you are able to ask Graph API about the user's instagram business account.
Et voilà.
PS: You will not be able to use the Open Graph API tool from your test user. My advice is to test your app from Incognito mode so it will not interpose with your personal account.
UPDATE
Currently, access the instagram data from this way is disabled but this is the right way to access the data.
FB error message says:
(#200) Access to this data is temporarily disabled for non-active apps or apps that have not recently accessed this data due to changes we are making to the Facebook Platform. https://developers.facebook.com/status/issues/205942813488872/
You can get full functionality of Graph API if you login with the developer account, use that to create a video screencast of app functionality and submit
You will have to create a test application out of your real application, these applications are in sand box mode by default (developer mode) https://developers.facebook.com/docs/apps/test-apps/ You will be able to access any fb permission / feature with it, and develop a product with it. Once you are ready to review, in your submission of your real application link your test app in the process

Resources