Client cannot access G suit with deployed app - javascript

I have deployed my app from app maker and when I have my client access the app through the URL I get once I publish it, the client cannot use the app for its intended purpose.
The app is suppose to take calendar events from their Google calendar when given a specified date, and create folders and documents in the clients google Drive. But when the client uses the UI, nothing happens. I'm not sure if its a permission issue but I have tried giving admin access to clients so they can access/edit any data in the app so I am not sure why the client app does not do anything.

It turns out that the issue was the folder that was specified for the app to place the new folders and docs created by the app was shared to the client but the client had to add it to their drive in order for the app to be able to add folders and docs into the Drive folder.

Related

Connecting multiple angular apps for accessing different services provided

I am new to web development. I am trying to create multiple Angular applications, such as App1, APp2, App3. where App1 and App2 have common features, which i want to add them in the App3 instead of repeating them in both App1 and App2.
For instance the common feature is Authentication. I want to use App3 for authenticating both App1, App2. All three apps are running on different server and i am redirecting to App3 from App1 and App2 for authentication. using
window.open('url', _self)
After the authentication process is successful i want to redirect it to the origin App. It also works fine.
I have some information which i store in local storage during authentication. but when redirecting from one app to another using
window.open('url', _self)
information stored in the local storage is lost.
It will be a great help if someone can guide me a better way to store the information on user browser and access it across apps even when the redirection to other apps happen.

How to get the latest cms posts data in a gatsby built project?

I've build a static website with gatsby and it workes fine . The problem is When I change the posts title and body in contentful cms and refresh the website it doesn't fetch the latest updated version of posts.
How can I always get the latest posts from a cms like contentful ? Do I have to rebuild the whole project and then redeploy the built files to hosting service everytime there is an update in cms posts ?
Yes, Gatsby is a static site generator so you have to rebuild after changes in your CMS. Where are you hosting? Netlify is a hosting platform that does this for you automatically.
As it has been said, Gatsby is a static site generator and it needs to re-fetch the data in the build time, so you'll need to redeploy the site. There's an automated way, however, to achieve this, called webhook.
A webhook is a way for an application to notify another application when a new event has occurred in real-time. In your case, once your data has been updated, deleted, or created, the webhook will trigger into the server the new deploy.
Depending on your host, the webhook is automatically set (like Netlify, because every change is a branch that is merged in a pull-request once the deploy occurs) or needs to be built from scratch.

How do I get "storageBucket" in Firebase to generate?

Firebase keeps giving me empty "" instead of generating a URL for "storageBucket" when I try to get the code to paste into my HTML for login through Google. I am assuming this is the reason I am getting the error: This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.(anonymous function) # iframe.js:84
I am using browser sync to user localhost which is supposed to be an authorized domain. I have the firebase cdn in my header of my HTML and everything that was generated for my firebase app (except for the storageBucket). I tried importing my app to the new Firebase, just typing in my app name in a similar storage bucket URL ("eventSpot.appspot.com") and I tried just creating a new app in Firebase. None of these worked. Is there something I am missing?
Thanks in advance for your help! :)
The storage tab can take some time just after project creation - but if you've left it a little while and you're still getting the error, it may be some APIs have not been enabled.
Can you go to https://console.developers.google.com/project/_/apis/enabled
Check for:
App Engine Admin API
Google Cloud Storage
Google Cloud Storage JSON API
If any aren't enabled, enable them. After that, try the storage console again.

Prevent users from seeing Meteor client script by role

In Meteor we put all sensitive code in /server and browser code in /client. Meteor then automatically compiles and minifies all /client side code for us. Thanks Meteor.
However, I'm using https://github.com/alanning/meteor-roles to manage content by user roles. One of those roles is an administrator and I have a client side scripts for use only by that user eg: /client/admin-only/**.js. All code in those scripts checks the user is an administrator and only calls the server to do sensitive tasks, but I don't want anyone but an adminstrator to be able to even see that code.
What I want to ensure is that these client admin JS files are only downloaded to users who are actual administrators and not included in the auto-compiled/minified JS created by Meteor.
Is there any way to setup Meteor to generate 2 versions of it's client JS - One for normal users and one for administrators - and only download those files based on user role?
The Meteor Guide addresses this issue:
While the client-side code of your application is necessarily accessible by the browser, every application will have some secret code on the server that you don’t want to share with the world. Secret business logic in your app should be located in code that is only loaded on the server. This means it is in a server/ directory of your app, in a package that is only included on the server, or in a file inside a package that was loaded only on the server.
Basically, MDG's guidance is to dumb down that admin view as much as possible. If that's not acceptable, you'll need to have it bundled in a separate Meteor application on either an internally accessible network only, or by using two MongoDB instances so you can separate authentication out for the second app.

deploying an angular app on aws cloudfront

I have a laravel php app which is basically an api that the user will access through an angular single page app. Currently the angular app is contained with the public folder but I want to break it off on its own so that I can deploy it via amazon cloudfront.
I found this article for hosting static websites on CloudFront which explains the basics but I cannot find anything that discusses the hitting of an api with your cdn served site.
I would like to still be able to have 3 different environments, dev/staging and production which each currently have their own elastic beanstalk managed instances and seperate databases. I would like their addresses to be dev.blah.com / staging.blah.com and blah.com respectively and have each version of the angular app hit the correct backend etc.
I would like to be able to deploy the angular app in a similar way to how I deploy to elastic beanstalk, ie git push
Can I set it up so I dont need to modify the api endpoints in the angular app for each environment. ie the dev version hits dev.blah.com/get/user/1 and with the same source the staging hits staging.blah.com/get/user/1? Will this happen automatically or do I need to take specific actions to allow for this?
Are all these things possible? I dont expect a step by step guide but just looking for an outline of the process and a push towards where I can find the resources to learn how to do this myself as my searches have not resulted in much
On CloudFront, in the "behaviors" tab of your distribution, you can assign a path to every origin. For example, you can specify that /* requests are redirected to a S3 bucket with your static resources but /api/* is redirected to your api backend.
As for the dev/staging/prod environments, those would probably be 3 different distributions too. They can point to the same or to different origins.
See "Whole Site Delivery with CloudFront"

Categories

Resources