#Laravel Auth Question

8 messages · Page 1 of 1 (latest)

plush wind
#

Hi guys, I wanna ask how do I use Laravel Auth with an external API using C# ASP.NET Core Web API. Is that possible? If possible how do I do it?

cosmic siren
#

Not sure what you're asking, what does "auth with an external API" mean?
For APIs you'd use things like oauth, or simple bearer tokens

plush wind
#

It's like I want to use authentication in laravel but the data is from an external API

cosmic siren
#

So PKCE oauth?

plush wind
#

What's PKCE oauth? sorry I'm new to this

cosmic siren
#

Well, one way would be to use oauth. The C# app would be the provider, then your Laravel app uses an oauth client (such as Socialite), the user would be redirected to the C# app, where they sign in. Then the Laravel app retrieves the credentials for that user (name, email, not password, a token to consume the API).
But yeah, it's rather difficult to give any sort of advice if you don't know what your requirements are, what you want to do, what this integration needs to be

plush wind
#

I'm currently making an ecommerce app, and I'm planning to use laravel and C# because the app required to use an external API. So after like I login, I can add items to cart, then proceed to payment.

#

Is it possible that I fetch the data from the API then I use auth in laravel?