laravel-ready / license-server

Ready to use License Server package for Laravel. Add a licensing system to your products or services.
MIT License
104 stars 24 forks source link

Multiuser-License possible? #10

Open maxleistner opened 5 months ago

maxleistner commented 5 months ago

What i want to achieve: A user buys a product based on user counts. So he buys software 1 with 5 users seats and software 2 with 3 user seats. Now the buyer gets one license key per software (2 in total), which he can distribute to others, who then can enter this license in their account and get access to the adequate software.

How can i achieve this? any ideas?

relliv commented 5 months ago

Hmm, I didn't think of it this way. Probably you want to create anonymous licenses, right?

A user can create a product linked anonymous (initially no releation for user) license but if anyone use this licenses (we assume they already registered or will be registered) we going to assign given license to current logged in user.

Such as dealership and distributor (I couldn't find right word). This need seems to belong to someone in between or it could be for special promotional integrations or discount campaigns.

maxleistner commented 5 months ago

Not quite my intention.

1 license can be sent to x users who are registered (outside of the application, by mail f.e.). This user enters this license into a field within his account and IF there are seats left he get's access to the software.

So the license in the database would need an extra field called "seats" f.e.

relliv commented 5 months ago

It makes sense now but how will you know who has which seat? For example, you created 1 license key for 3 seats but how can we prevent 4th license access? In this case, we need one more parameter like user_id. I think we can solve this problem with a pivot table. Then we can show activated licenses or remove them. On the other hand, we can increase or decrease the seats.

Also, can you give a real-world scenario?

maxleistner commented 5 months ago

Sounds good. This my current real world scenario :)

I have a SaaS page, where user can buy licenses for applications, where they get access to as soon as the bought a license. The thing that is missing, that i can buy multiple seats and give me collegues access to the pro version of the application.

The application is within this laravel app. So one source of truth - one db. Access managed by Jetstream.

relliv commented 5 months ago

Ok, I understood. I'm working on a new license server and connector package version. I'll publish it soon. Also, I can add this feature.

maxleistner commented 5 months ago

really! cool! Sounds great! thx