How to automate creation of client secret json file - javascript

I am looking to integrate the google analytics in html page by clicking the login button, by clicking the login button how to get client_secret.json automatically.
Please help me
Thanks in advance:)

The client_secret.json file is used for authenticating an application to Google via OAuth2. The credentials file is created on Google developer console when you create your client credentials for your project. This must be configured manually by the developer of the application.
This can not be fetched automatically.

Related

Wordpress SSO and Tableau Embedded Analytics not showing Embedded Views correctly

I am currently using Tableau Cloud as the Administrator to setup client portal accounts. I'm using the miniorange SAML IDP plugin to authenticate Tableau with a Wordpress login. The authentication works, the issue comes when I try to open a page with an embedded visual. Where the visual is supposed to be, I get a view of the login page on my existing website. It's basically our website within our website. Somewhere along the SAML interaction between the two platforms, something is causing the embedded visual not to load and I can't figure out why. The console error I get is:
https://10az.online.tableau.com/javascripts/api/tableau.embedding.3.4.0-pre.22.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
I get that it is an error response code, and I'm wondering if it has to do with version compatibility. Here's the strange thing, if I'm not using SAML to authenticate and instead just using a Tableau login, the visual shows up exactly as intended. The whole point of using SAML is so that our clients don't have to login multiple times and so they also don't need to have credentials to our analytics platform. Any input would be great.

How do I allow users to edit my Sheets file via my own Google Scripts Web App?

I'm quite new Google Scripts. I'm trying to create a web app through which users can log in (with their Gmail accounts) and modify a Google Sheet. Here's a screenshot of the registration page.
Initially, the user logs in via their existing Google account and this page is displayed. Upon clicking the button, what I want is for the script to add their submitted information and their current email to a Google Sheet. Once their info is in the Sheet, they only need to log in via Google to gain access to the system. However, when I try this with another account I get this error:
Is this a permissions problem? Or does Google Scripts not allow this kind of direct manipulation of files on my Drive? Here are my permissions settings for my web app:
Is this at all possible?
From your question, I could understand that the settings of your Web Apps is as follows.
Execute the app as: User accessing the web app
Who has access to the app: Anyone
For above Web Apps, you want to make users access to the Web Apps using each browser.
Confirmation points:
From above situation, please confirm the following points. At first, I think that when the Spreadsheet you want to put the values is in each user's Google Drive, no error occurs. So from your question, I thought that the Spreadsheet might be in your Google Drive.
Although I'm not sure about your whole script, if the Google Spreadsheet which is used in your script of Web Apps is in your Google Drive, it is required to shared the Google Spreadsheet with the user. Even when the script of Web Apps is the container-bound script of the Spreadsheet and getActiveSpreadsheet() is used, it is required to share the Spreadsheet with the user.
When you want to put the values to your Spreadsheet in your Google Drive when the user submitted the form, please share the Spreadsheet with the user as the writer.
When you want to only read the values from your Spreadsheet in your Google Drive when the user submitted the form, please share the Spreadsheet with the user as the viewer.
Also, you can publicly share. But I thought that this might not be the direction you expect.
Other method:
If you don't want to share the Spreadsheet with the user, how about the following workaround?
Deploy new Web Apps as following settings.
Execute the app as: Me
Who has access to the app: Anyone, even anonymous
In this case, you can also make user access to this Web Apps using a key as the query parameter.
When Who has access to the app: Anyone is used, it is required to share the script of new Web Apps with the user. So I proposed to use Anyone, even anonymous for this situation.
When the form is submitted, the values are put to your Google Spreadsheet using this new Web Apps.
In this case, new Web Apps is used as the wrapper API for putting the values to Spreadsheet.
References:
Web Apps
Taking advantage of Web Apps with Google Apps Script

How to get user details of Azure Notebook using extension?

I am trying to write an extension for the Azure notebook which will allow the user to submit their questions to my backend application(written in Flask).
So far my extension's javascript is able to get the .ipynb file details and cell number and send it to the backend application along with the user's question.
Now I want to send the user information also to the backend application so that I can associate the question to the respective user in my application's database.
I did a lot of google search but I am not able to find a proper way to get Azure notebook's user information in my extension's javascript and send it to the backend application.
Does anyone know what is the proper way to do that?
Yugendra. Based on my researching ,maybe you could call Microsoft Graph NoteBooks REST API in your extension js to get the user information of notebooks.
I test list notebook rest api in the https://developer.microsoft.com/en-us/graph/graph-explorer and the createdBy property shows the user information.

SAPUI5 Login page?

i cant find any simmilar to my question soo i want just to know if i can make a "login page" my own instead of the popup
this there a way?
My application is deployed on the cloud platform and goes trough a cloud connector to the sap backend system where it get his odata data from..
Its kinda ugly and i cant find anything to this.. except when the app is deployed in the abap repository.. but my is deployed and running trough the cloud platform.
(Username = SAP User and password also sap user pwd)
so maybe someone can help or paste an example
This pop-up is appearing for the logon to your ABAP backend system.
You can simply remove it by setting up Single Sign-On

Upload file to my google drive from anyone using javascript

I am new to google api. I am able to do this file upload from app script and any file which is uploaded through that script get stored to my drive only.
But how to do this using javascript.
Example on google : https://developers.google.com/drive/web/quickstart/quickstart-js
shows how to do this but file gets uploaded to the same user's drive who is authorizing the app. How to restrict it to my drive only.
Thanks
Simple answer is you cant with JavaScript. The reason being is that JavaScript works with OAuth2 this requires that you ask the user permission to access your data.
If you want to have it access your drive account you would have to save the refreshtoken some place and then send that when ever the script was loaded. JavaScript is client sided so anyone that checked the code on the page would then have all the information they needed to do what ever they wanted with your drive account. Security wise that's a bad idea.
I recommend you look into using a server sided scripting language like PHP. You might want to consider a service account. Note: everything will be owned by the service account so you will either have to give the Service account access to your Google Drive files or you will need to move your drive files to the Service account.
If you don't want the service account to have the files you could go with normal Oauth2 save the refresh token and then store it in the server sided code there wont be as much of security risk there.

Categories

Resources