How to override auth/local/register endpoint validations in Strapi Framework? - strapi

I am new to Strapi framework (started learning today itself) and My front-end has login with Instagram only. So no need to remove email and password validation for the http://localhost:1337/auth/local/register endpoint.
I have removed validation from .chache/admin/containers/AuthPage/forms.js, but it doesn't get affected.
Where do I making mistake? I have searched for the answer but didn't get it.

I found the solution.
I copied config and controllers folder from node_modules/strapi-plugin-users-permissions into extensions/users-permissions and made changes in controllers/Auth.js and it worked .

Related

Laravel SPA (laravel + vuejs + sanctum) deployed in subdomain returns wrong api

I have this problem since several days.
I'm developing a Vuejs/laravel app, using Sanctum as an authenticator. where laravel mainly have the api gestion role, and I've started to deploying it. On Local, everything looks fine, api and auth are working.
On deploy, since my app is binded to be in a subdomain (laravelapp.maindomain with folder path of domain/laravelapp), when i try to access any page (vue-router) instead of domain/laravelapp/login i get domain/login, even if the page itself is looking fine.
If i try to reload the redirected page (domain/page) i have a 404. Also, since every API is pointing to domain/api/link instead of domain/laravelapp/api/link, everything is broken starting with auth.
I've tried modifying .env file, RouteServiceProvider, .htaccess(but i have no knowledge about that).
I also tried to set the subdomain Document Root to domain/laravelapp (it's the first thing i've done), but not only it dosn't work, if I try to print on screen subdomain's root, it returns domain. It's becoming a real issue right now, thank you for any help.
EDIT: I've discovered something. in the main domain there is a Joomla application. The api route contains the Joomla redirect (like, there is a plugin oh the site that changes language automatically, appending /en /it /de given the chosen language). So, in my case, the api is domain/index.php/en/subdomain. I tried again being more specific with document root, with no results, and playing around with .htaccess, but with no success.

How do i set up laravel as an backend api for nuxtjs

I've starterd working on a project based of a template i found on github. This template includes laravel, nuxtjs and vuetify. In this template laravel serves as a backend api for my nuxtjs project; Which is what i need.
The github repo: https://github.com/BakayYank/laravel-nuxt-vuetify
But what i dont like about this template is that the package.json file is filled with dependencies of which i dont know what they do or even if i need them.
I want to make my own project with laravel and nuxt but i don't know how to make laravel an api or how to send data to this api.
If anyone could help me understand or provide me a source that would really be appreciated.
This course teaches that beautifully if you are willing to pay for a month (It's totally worth it!). Laravel Api/NUXT Frontend Course
Otherwise, you would build the laravel app as normal but don't use blade views. Then in NUXT send data using ajax requests. If you have any other questions let me know! I hope that helps!

Vue and Laravel separate app - Need feedback on architecture

I need a bit of expert feedback on this please as I do not want to start my project in the wrong way.
I would like to keep my Vue code separated from Laravel, the reason being, I may use this vue app later on on Cordova.
First question:
I understand how to host the Laravel API and Vue app on 2 different domains, no problems at all but I am unsure on how to setup the folder when both apps are on the same domain.
I know that Laravel should be hosted below the public_html folder and have a symlink to the public folder for security purpose. But where should my vue app goes?
Second question:
When I save images from Vue(as I am creating a blog) the images are going to the Laravel store/images folder, so each time I want to show an article in my vue app, the API must each time request the content(text and images) from the Laravel API, is this fine? Will the Google bot be able to trigger the API request when requesting the content?(I actually never thought of this...)
Thank you so much!

Laravel on a directory, links e.g. login link does not work

I have uploaded my Laravel app unto a directory under the public folder on my domain,
html_docs/public/store
where 'store' is the folder of my Laravel App. My main domain pointed at 'html_docs/public', please check my laravel app here "https://www.dinhi.org/store/". As you can see, when you click the "sell with us" or "login" on the top header, it returns
Not Found
The requested URL /store/dashboard/login was not found on this server.
I have set up to in my '.env' and in my 'config/app.php' the right url like "https://www.dinhi.org/store/" but still not working, any ideas, help please?
PS: I'm on Laravel 5.3 and I'm using Hesto Multi Auth. In my local, this issue does not exist like everything is good and working.
Laravel is not meant to be installed completely into the document root of your server. Actually, every folder of your laravel application except the public folder should be inaccessible from the web.
Your exposing yourself to a security risk here, since everybody could access every file of your app, including potential .env files with database credentials and the likes.
Cheers
Christoph

uploading files from one domain to another in laravel 5

I am kinda stuck in my laravel 5.2 application (I'm actually a newbie in Laravel). I am working on a project with both front and back ends. The two ends are hosted on two different domains (frontend on the main domain and backend on a subdomain). The problem is, am trying to upload files (images) from the backend on the subdomain to a folder on the main domain. I have made extensive research on how to do this to no avail. Hoping to get assisted. Thanks.
Try to make the upload form on the same server that the request is procesed and try to include the form on the other server using an iframe or something similar.

Resources