I have a react-native app that communicates with a laravel backend. I need to be sure that the backend routes are only ever accessed by the mobile app and never from a web browser or curl requests. Bottomline, i want the routes to inaccessible outside of my react native app.
How can i make sure that the routes are only accessible from the android react native app in laravel?.
Related
I have a simple vue app that connects to spring-boot backend. I integrated electron in the vue app so it runs as a desktop app as well. Everything works but I have to run the spring-boot manually before running the vue desktop app.
How can I run the spring boot from the vue electron app so the user does not need to run it manually?
The vue desktop app is available here https://github.com/iaBIH/pr-vue-tutorial/tree/main/vueARX/simple-ui
Thanks!
I am new to Laravel.
I am developing an application which is going to be an Web (laravel8 + vue.js) + Mobile App (Android).
Application has both backend and frontend on both web and mobile app.
Which means I need routes for web application to manage backend and frontend and API routes to manage same.
So, I was thinking how I should structure my code in Laravel to reduce code redundancy and what is best approach to plan my project DIR structure, routes etc.
Thanks.
I suggest you take a look at and consider using Laravel Breeze or Laravel Jetstream with the Interia.js & Vue.js stack. Here is the info: https://laravel.com/docs/8.x/starter-kits.
While both of these kits come with Inertia.js (Breeze only if you include it during installation), you don't have to use it and can use Axios or whatever you prefer.
These kits offer scaffolding with the routes, controllers, and views you need to register and authenticate your application's users and you should be able to easily build you API on top of either for the mobile app.
I used to use this:
Project
--routes
----api.php => you have API router here
----web.php => your web router
--views
----create-product.blade.php => then call to vue component
--vue
--create-product.vue
Here's the situation:
I have a Laravel application
there is a mobile application, to which I do not have the source code (the client had a falling out with the previous developers)
we need to build a new mobile app which does essentially the same things as the previous one
I would like to use the same routes the previous mobile app used
The thing is, I don't know which routes the old app is using.
In the routes directory we have:
api.php
channels.php
console.php
legacy_app.php
web.php
I am trying to send requests to these routes with Postman, but they always return an empty response.
I know I can go through the back-end code, try logging stuff while using the app, etc, but I would much prefer a way to reliably get a list of routes and required parameters. Is there any way at all to accomplish this?
I have a website which uses an identity server to authenticate a user, though OIDC, I think. Inside the Xamarin Forms application, I have a facility to log in a user through an identity server via a token.
The website itself uses cookies to handle access tokens which difference to the application. (Note: the website was not written by me). I have so many features to write, so I decided to use WebView to handle those features using React, etc., so I don't need to rewrite the code in native and easy to manage at runtime when people using the application.
What is the logic behind having the mobile application log into the authorized page silently without the user needing to authenticate within the WebView?
Is it possible to handle this scenario?
On Android you can use the CookieManager to add/remove cookies that your private instance of Webview will use.
On iOS, UIWebView has NSHTTPCookieStorage and on the newer WKWebView (11+) you have WKHTTPCookieStore
Is it possible to use Firebase for authentication of a Sinatra app in much the same way that I can use Auth0, and if so, how? The samples from Firebase all seem to assume single-page applications talking to a backend using JWT. Mine would be a traditional, fully server-side-rendered app.