You could make an api, which would check if the user exists and returns the login credentials. I don't really understand the question, as Spark is a billing platform, and not an Auth infrastructure. Do you mean login a spark user? The documentation states that you should make a composer auth.json and then use an api token to login your user https://spark.laravel.com/docs/2.x/installation.html
vpfz liked this reply
Sorry, I'm very new to Spark and Laravel in general. I don't mean to login a Spark user (admin). When the end user visits the site he has to register for an account and subscribe so I figured it should have some auth built-in? Or do I have to use Jetstream separately? Spark Classic had user accounts so I'm not sure what is the way to go with Spark next.
Here I can see you can check if the end user is subscribed or not: https://spark.laravel.com/docs/2.x/spark-paddle/plans.html#determining-subscription-status
We all start somewhere, so digging deeper into the documentation, we see that it says you should read up the spark middleware documentation https://spark.laravel.com/docs/2.x/spark-paddle/middleware.html and that you can use laravel cashier methods https://laravel.com/docs/9.x/cashier-paddle#checking-subscription-status Might I suggest you take a look at https://www.youtube.com/watch?v=czh8oO7lVx0 this tutorial by Povilas Korop, his channel provides quality free tutorials in regards to Laravel
vpfz liked this reply
Thanks, I have read the middleware documentation but I'm still lost on how to do this. Do I have to create an API for auth from python? I had also seen the youtube tutorial you linked last week.
Yeah, you're gonna have to make the api in python. There's really no other way that I can think of.
vpfz liked this reply
Would any of the following work for this? https://jetstream.laravel.com/2.x/features/api.html https://laravel.com/docs/9.x/sanctum#mobile-application-authentication
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community