Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I am new to APIs. I want to make an API-centric Laravel web app and an Android app. They will use private API.
I am not sure how to make the user auth for the API. I have read many articles about JWT and many more about OAuth2 but I am still not sure which one to use and how to actually make it.
I recommend that you read through this very digestable book - https://apisyouwonthate.com/. It helps with the theory and the implementation of an API in Laravel. Although the code is specifically for Laravel 4, virtually everything in the book is still helpful.
Starting in Laravel 5.2, the framework has been providing support for token authentication and web form authentication right out of the box. https://www.laravel.com/docs/5.3/passport
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 days ago.
Improve this question
I want send code otp to user's phone for confirmation number phone from controller in laravel ,i'm use laravel for backend and send data to flutter app by api.
I want send code otp by firebase otp because free .
plase help me,how to do it?
I did create account in firebase and edit settings but I don't know how to relate it with laravel for(otp) not for notification(i did it).
i found only with view(blade) and recaptcha by js .but this not my goal
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 months ago.
Improve this question
My question may lack specifics but I just cant understand how the whole process should work.. How I should implement it? What are the ways? Any guidance is welcome.
I have followed official documentation, their guides but even if I get something to work I dont really know if I am doing the right thing as is the end result what I need?
I think I need server side in order to store the sessions and credentials to the database.
It is a side task in my school, I am also limited to using only Golangs standard packages.
Not sure, What exactly you are looking but few things i am mentioning which might help you.
Google Sign-In for server-side apps :
Implementing the one-time-code flow :
The Google Sign-In button provides both an access token and an authorization code. The code is a one-time code that your server can exchange with Google's servers for an access token.
Create a client ID and client secret
Include the Google platform library on your page
Initialize the GoogleAuth object
Add the sign-in button to your page
Sign in the user
Send the authorization code to the server
Exchange the authorization code for an access token
For better understanding refer here : https://developers.google.com/identity/sign-in/web/server-side-flow
and https://cloud.google.com/go/getting-started/authenticate-users-with-iap and https://skarlso.github.io/2016/06/12/google-signin-with-go/
In Golang we have this library : https://pkg.go.dev/golang.org/x/oauth2/google
This is the example you can try by your own : https://dev.to/douglasmakey/oauth2-example-with-go-3n8a
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
What are the differences between these 2? And which one is better for a simple VueJS app?
I've read their documents a few times but still confused.
Thank you very much.
Passport provides a full OAuth2 server implementation for your Laravel application in a matter of minutes. It is therefore necessary to have a brief knowledge of OAuth2.
Sanctum it is a simple package to issue API tokens to your users without the complication of OAuth. Sanctum uses Laravel's built-in cookie based session authentication services.
In a small application use Sanctum. it's simple and easy.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I'm creating an erp with laravel + larvel nova, a rest api with laravel and frontend with vuejs. My doubt is: where should i build my database migration as better practice, should i put my migration in my erp project or in my api rest project. Both will use the same database.
My suggestion is to create your migration in Rest Api beacuse api most work is in database and you want to give data(which is in Database) to user in most cases with Api!
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
We're using direct integration which works fine for the customer and they are correctly redirected to the 3D secure page for validation and enter the password if required by the backend. We want to take payment over the phone as well. Sage Pay offers terminal transaction within My Sage Pay page, but I couldn't see to find any documents that we can do same but from our backend. http://www.sagepay.co.uk/support/15/37/process-a-terminal-transaction
It's exactly the same as your ecommerce integration - all you need to do differently is specify AccountType=M in the transaction post. This will suppress 3D Secure checking. You will need a MOTO MID on your sagepay account, though.