Github Apps: Authorize & Request on applications doesn't return code parameter - github

I've created a Github app with the option "Request user authorization (OAuth) during installation".
When a user requests his admin to install the app, the admin accepts and gets back to the app. I then get a url like:
http://localhost:3000/auth/github/callback?code=a22757013d09ccc5f6ed&installation_id=18334019&setup_action=install&state=MYAPPSTATE
BUT when the user Authorize & Request and he gets back to the app I only get a url like so:
http://localhost:3000/auth/github/callback?setup_action=request&state=MYAPPSTATE
My question is, how to get Github to give me the code parameter so I can know which user has requested to install the github app ?
Thank you 🙏

Apparently this has been fixed now https://github.com/pre-commit-ci/issues/issues/70#issuecomment-899129055

Here is the response I got from GitHub support:
The code parameter is only returned for authorization during installation. There isn't a way to generate one for the user who has requested an admin to approve, authorise and install.
As an organization owner/admin, you should see on the GitHub App review install page the user who has made this request during the application installation. You can also check the integration_installation_request.create logs in the organization to find the user who has requested the installation

Related

Google Auth API - idpiframe_initialization_failed on Production environment

I integrate Google's Auth API in my production website.
When I enter the login page, it throws an idpiframe_initialization_failed exceptions to the console.
I found out that I can fix it by enabling that API / Cookies in my chrome browser, but I want to find a comprehensive solution that will prevent those exceptions in my production environment.
So my two questions are:
What do you suggest me to do in order to achieve that?
In general, what is the meaning of those excpections?
Thanks :)
If you have a production url like http://godaddysite.com etc host your page there with a Webserver.
Opening a htnl page from your computer with javascript doesnot work as it is not hosted on webserver.
Please check your redirect url etc when you created Oauth client.
Go to the Credentials page.
Click Create credentials > OAuth client ID.
Select the Web application application type.
Name your OAuth 2.0 client and click Create
check origins
create new OAuth with correct origins.

There was an error getting a Chat authorization token. Refresh and try again

I recently created a chatbot via http://dev.botframework.com/bots (the page initially displayed the info that I did not have any bots). The form redirected me to Azure Portal where I chose a new "Web App Bot" option. I also created all required resources (RG and even setup a new tenant with admin rights).
After successful deployment I got the following issues:
Test in Web Chat in bot settings (Azure Portal) shows "There was an error getting a Chat authorization token. Refresh and try again."
Channels in bot settings shows "Unable to find the bot with the specified id."
dev.botframework.com/bots shows there are no bots created
Have anyone had this issue?
I also get same issue and it got resolved, Please refer below url , it may help you as well.
https://github.com/Microsoft/BotFramework-Emulator/issues/1068

"Your GitHub user account does not have access to this repo" on the admin url of the gatsby blog deployed on netlify

I'm trying to setup gatsby blog and followed all the instructions from their documentation. Everything worked fine, but when I go to the admin URL of the site and try to log in, then it says "Your GitHub user account does not have access to this repo". I have authorized to give access to the repositories but still, I can't log in. And thus, I can't access the CMS. Why does it happening?
Creating Github OAuth Client ID
-Goto Github Developer Settings
-New OAuth
-Enter Application name
-Homepage URL as Netlify URL
-And Authorization callback URL to https://api.netlify.com/auth/done)
Once Client ID and Secret token is generated configure same in Netlify Access Control as described:
Accessing Netlify CMS Admin
-Goto your Netlify site admin
-Goto Access Control > OAuth then Install Provider you need to select provider as Github as add Client ID and Secret
-Your Netlify CMS is ready. Goto you netlify site URL and append /admin/. for example example.netlify.com/admin/, You will see login with Github button.
=> If that doesn't work, let me know
It seems that you have not authorized properly the application.
You need to configure the settings repository.
In your repository settings (https://github.com/settings/installations) you should have the Netlify application ready to be configured and the proper OAuth. There, you will need to select your project:
Then, under https://app.netlify.com/sites/YOUR_SITE_URL/settings/identity, configure the previous auth access:
Just go to the site in Netlify App and then: Site settings -> Identity -> Services. Under Git Gateway click 'Edit Settings' and then 'Generate access token in GitHub'. A popup will appear where you grant permissions. Save it. Done.

Call Microsoft Graph API - App only unauthorized error

I am trying to make request to the Graph API using a service with no UI. I downloaded the following sample code and followed the instructions: https://blog.kloud.com.au/2015/12/14/implementing-application-with-o365-graph-api-in-app-only-mode/
I successfully get an Access Token, but when using it to make a request to get organization information (required Read Directory Data access), I get 403 Unauthorized.
I have registered my app in Azure AD (where I am a co-administrator).
I have specified Microsoft Graph in the 'permissions to other applications' section, and given Read Directory Data access.
Interestingly there is a note below saying 'You are authorized to select only delegated permissions which have personal scope'. Even though I clearly did. Why? I suspect this is the source of my problem.
Likewise I have checked my demo app against these instructions: https://graph.microsoft.io/en-us/docs/authorization/app_only, but it makes no mention of what role in Azure you need to have.
in this SO post's answer, there is mention of still needing to Consent. I haven't found any documentation about this.
You are authorized to select only delegated permissions which have personal scope
This issue is caused that the app is created by none admin and when they visit the portal then will see this message.
To grant the app-only permission to the application, we need to be the administrator of the tenant. It is different with the co-administrator. To user the Client Credential flow, I suggest that you contact the admin of the tenant to create an application for you. And if you were just for testing purpose, you can create a free tenant and register the application yourself.
Update
We need the assign the Global administrator director role as figure below to make the application works for the client credential flow:

Facebook Connection Failed error in magento website?

I have done following steps:-
created an facebook App with all the details filled and got AppID and App Secret.
Integrated an facebook extension to my magento website and filled AppID and App Secret to magento admin.
When I login then it asks for the permissions to access the facebook user details also, but after that it shows error "Facebook Connection Failed".
My website is at localhost and I filled site url = "http://localhost/magento/mywebsite.php" in the facebook App which I created.
I have done this thing prior also. It worked previously but not working this time.
You can't use localhost URLs when configuring your app. The URL needs to be accessible to Facebook. Either use the IP address of your test server, or register a test domain.