Why does laravel need authentication while sending mails? - laravel

Why does laravel need authentication while sending mails? Is it possible to send mail without authentication just a valid email id?

Related

Is there any way to send firebase OTP SMS authentication through web

I am new to firebase , I want to know that is there any way to send firebase OTP SMS from Laravel backend ?
I am using Laravel 6
When using Firebase Authentication, signing in the user (including requested an OTP via SMS) always has to happen from the client-side code. So while you can request the SMS OTP from client-side JavaScript as shown here, you can't send the SMS OTP from server-side PHP/Laravel.

Laravel - Fortify Register user and validate mail from api or json file

Can you help me I would like to make a user registration with fortify where the validation of the mail is done with a call to an external api or otherwise to a json. And after verifying that if the email exists, proceed to register otherwise a warning message that you can not register on the site.
Greetings,

Laravel Third Party API User Verification

I am trying to use a API which has a postable address where you can verify if a customer's username/password is correct, if so it returns a user ID.
What would be the best way of handling this, I need to query that postable API from the login form on my Laravel website to see whether or not a username / password is validated.
How can I use Laravel's Middleware to store a USER ID and session securely?
How can I create a Laravel session to allow someone to login to my Laravel site using their WHMCS client login?
The API I am using is https://developers.whmcs.com/api-reference/validatelogin/

How can I use Laravel Sanctum in a distributed system?

I need to use Laravel Sanctum in a distributed system, for this case, I have 3 participants:
The user
The API server
The authentication server
The authentication server is only for generate and validate tokens, the API must make the authentication by calling to the authentication server and sending the token in the authorization header of the request. This token it's sent by the user when calling the API (the user had to make a request for a token to the authentication server before)
I want to use Laravel 8 in the API server and also, I want to use Laravel 8 in the authentication server, I know that I can use Laravel Sanctum to handle the API authentication, but it has to be in the same server that the API is in, the middleware auth:sanctum works by searching the token in the same database that the API is in, but now I need that the middleware search the token in the authentication server who has another Laravel with another database, how can I do that? Do I need to do it manually?

How to use laravel sanctum without typical laravel /login

I have been created PWA with NuxtJS,
then I'm going to use sanctum package, but I don't want to request to the typical Laravel /login route, because I have a customized api /login route which authenticates users with OTP, not by password!
So I'm wonder how can I use sanctum in this situation??
You can use Sanctum's token based authentication to achieve this. All you have to do is add the HasApiTokens trait to your authenticable model and issue new tokens for it on a successful login. So you would have a route which will accept phone number or email and perform a login action. This would trigger the application to send OTP to the user. You have to store the OTP somewhere on the system. Then create another endpoint where user's can send back the OTP they received. This route will then check if the provided OTP matches the one on the system and issue a token to the user.
$token = $user->createToken(<provide-a-token-name>);
Make sure to send back the plaintext token to the user using the plainTextToken function on the token instance. User's will need to add this token to requests as a bearer token in the Authorization header.

Resources