When setting up Amplify project (through amplify init), why does editor matter at all? - aws-amplify

When I init my project, it asks for:
project name
environment name
default editor
...
Why does Amplify setup process even care about my editor? (e.g., what it can do about it? does it change anything based upon different editor?)

Because when you amplify api add you have options to edit the default schema.graphql in the editor you pick.

Related

how to implement ios & android google login in capacitor?

I am using capacitor-firebase-auth to set up my app. Already follow below guide line to setup, but the result still return
"CapacitorFirebaseAuth" plugin is not implemented on ios
URL: undefined
is anyone know what is problem?
Add custom URL schemes to your Xcode project:
Open your project configuration: double-click the project name in the left tree view. Select your app from the TARGETS section, then select the Info tab, and expand the URL Types section.
Click the + button, and add a URL scheme for your reversed client ID. To find this value, open the GoogleService-Info.plist configuration file, and look for the REVERSED_CLIENT_ID key. Copy the value of that key, and paste it into the URL Schemes box on the configuration page. Leave the other fields blank.
You need to add the URL that is requested in the info.plist file of your project, you will find this in the main target of your app [1]: https://i.stack.imgur.com/PLLgf.png
Btw, you will probably also need to add GoogleService-Info.plist to your project as well if you haven't already, you can find this in the project settings of your firebase panel (cog icon top left on firebase dashboard) and setup the SDK for iOS etc.
If you don't know your reversed-client ID, follow the instructions above to get the GoogleService-Info.plist, it is located in that file. Firebase will also give you instructions as to how to configure your project.

How can I prevent somebody who has my google-services.json from accessing my project?

I would like to know how can I prevent somebody who has my google-services.json file associated with one of my Firebase Firestore projects from accessing my project.
you don't need to create a new google-service.json after you make any changes to console,
it will be automatically created,
you just need to download it from
settings -> Project settings -> select your package/bundle-id -> click the download icon
I don't there's a way to you can change those credentials for the same project. Even if you delete that app and recreate it in Firebase project, it'll change the mobilesdk_app_id only. Creating a new project maybe the only way to get a completely new google-services.json
I'm not sure which SSH keys you are referring to but if you are just re-configuring your application then you can visit https://console.firebase.google.com/project/_/settings/general and then select the app name you are looking for. You'll have an option to download google-services.json there. The rest of configuration process should remain the same.

How can I upload my webapp to Amplify from Gitlab without using a .zip file

I am new to HTML/CSS and I'm trying to use Amplify to host my static site. I can easily use the "manual deploy" option and upload a .zip file.
What is the preferred method of using Gitlab with Amplify so that changes can be easily made?
My goal is to have everything in a repository that's not zipped so I can make constant changes.
You'll want to set up hosting for your website using the Hosting with Amplify Console option, which provides a git-based workflow for building, deploying, and hosting your website direct from source control.
You can trigger this workflow by running amplify add hosting in your project directory. Next, select the Hosting with Amplify Console option. Then, select the Continuous deployment option. This will open a browser window and take you to your amplify-project homepage. Here, click on the Frontend Environments tab, select your repository provider, and click "Connect branch". You will have to follow the steps to authorize Amplify to access your repository. Once your provider is authorized, you should see a dropdown menu with a list of your repositories. Select the appropriate repository and branch and click "Next".
Next, confirm your build settings. Assuming your website resides at the root of your project directory, your build settings should likely look something like the following:
version: 1
frontend:
phases:
# IMPORTANT - Please verify your build commands
build:
commands: []
artifacts:
# IMPORTANT - Please verify your build output directory
baseDirectory: /
files:
- '**/*'
cache:
paths: []
Again, click "Next". On the next screen, choose "Save and Deploy". Assuming all things were configured correctly, Amplify should now clone your repository and deploy it. You can now confirm that the process has executed properly by following the link provided by the CLI. Hereafter, every and anytime you push changes to your website to gitlab, Amplify will re-deploy your website automatically.
See docs for further info!

Firebase dynamic links on customdomain rewrite in hosting but how

I've setup a custom domain to use for firebase Dynamic Links. Hosting has been setup in Firebase Console and I tried to use dynamic links without the customdomain, but just a xxx.page.link.
Now I want to return to use the custom domain, but from the console I'm told that:
A configuration already exists for this site. Add the snippet below to your firebase.json file and redeploy your changes. Be sure the rewrite rule is the first match for your dynamic link.
I'm not exactly sure how to handle this. Should I use the CLI and init a project to make this change or can I somehow do this from the portal itself.
If I need to use the CLI, how do I then access the existing project and make the change?
It seems you're already using Firebase Hosting outside of just for Dynamic Links. In that case you'll need to configure it through the CLI.
The configuration for Firebase Hosting must be made through deploying the firebase.json file through the Firebase CLI. There's no way to configure this directly in the Firebase console.
You can create an empty directory, run firebase init in there, and configure it to your existing project. Once that is done, you can create and deploy the minimal firebase.json file required as shown in the documentation on setting up your custom domain.

Getting process.env to work with HERE API keys

I'm building a React geographic todo list, similar to this one. I was using a Mapbox API for the mapping component, but I'd like to switch it over to HERE's Map Image API. I've set up the map on my app, but I'd like to hide my app_id and app_code in the .env file I had previously created. Is this possible? I know it's also possible to restrict which domains have access to the key/code, but I wanted to keep the keys hidden in a .env file for peace of mind.
Here is my .env file (without the keys, of course):
REACT_APP_HERE_ID={my app_id}
REACT_APP_HERE_CODE={my app_code}
And here is where I'm introducing it into my App:
const app_id = process.env.REACT_APP_HERE_ID;
const app_code = process.env.REACT_APP_HERE_CODE;
When I console.log app_id and app_code, they both return undefined. The previous API key I had from Mapbox worked fine in my .env file, but I can't seem to get the app_id and app_code from HERE to be recognized the same way.
Am I missing something? Is it easier to just limit which domains are able to use my id & code?
I assume you are using 'react-scripts' module for building/starting your project. Also as per above description, I can see you are using correct prefix 'REACT_APP_' to declare any variable in your .env file.
Just do a fresh build of app using command:
npm run-scripts build
or Just restart your app using :
npm react-scripts start
I think it should work fine.
And, Yes you can limit which domain should use your AppID and AppCode, using the feature "Secure app credentials against a specific domain" provided at https://developer.here.com/, just below the place where you see your id and code.
Hope this helps.

Resources