Note : I have used lightning:isUrlAddressable, lightning:hasPageReference as well to get the parameters.īut pageRefernece does not have that value as URL is getting trimmed/ removed before doInit of lightning component. **state**=https%3A%2F%%2Flightning%2Fn%2Fmynamespace_DragandDrop&**code**=XXXXXXXXXXXXX(**THIS CODE I NEED TO USE TO GET TOKEN**)&scope=https%3A%2F%2FIssue I am facing is I am not able to read or get Code parameter from URL as immediately the page redirect to salesforce and lands to my custom component the URL is removing other parameters thus loosing code value is passed from google auth.Īny suggestion, how I can get the parameters and solve this issue is highly appreciated. The file (s) you uploaded through the appsheet app will be saved to your cloud service, google. Refering to those file type files, you just place the expression I explained in my previous post as app formula, which will return the URL for the file you upload onto that file type field. With -> Google authorization window is opening where I can select my google account for authentication, after authentication page is redirecting with URL which has state and Code.Īs below. Then you create the table/column with FILE type in appsheet. Url = autheURl+'client_id='+client_id+'&response_type=code'+'&scope='+'&redirect_uri='+redirect_uri+'&access_type=offline'+'&state='+state Redirect_uri = '' /*DragandDrop is name of my custom lightning component */ To get that we need to pass certain parameters in auth url as below autheURl = '' Add remote site setting for google auth and token url.Īs per google documentation first we need to get "code" using google auth url. Whitelisted Authorization URL and redirect url'sĤ. Google project credentials (Client key, secrete key)ģ. I am trying to achieve functionality to upload a file from Salesforce to Google drive.ġ.
0 Comments
Leave a Reply. |