Giter VIP home page Giter VIP logo

Comments (13)

saltukalakus avatar saltukalakus commented on August 16, 2024 3

Hi @joshcanhelp , @lbalmaceda just wanted to put a brief note here as well for the internal eng. issue. I was able to reproduce the issue using this repository. Let me know if I can with anything else.

from laravel-auth0.

dustinleblanc avatar dustinleblanc commented on August 16, 2024 1

Hey @joshcanhelp ! That documentation was helpful during implementation, I've just run into a limitation running that setup. I can load my user from the database, and access all the data we define for the user in the database tables, or I can instead load the user using's Auth0's provided classes and get the Auth0 metadata for the user, but at the current time I can't really see how to load both sets of data on a single object. I'd like to have my user model extend the Auth0User class provided by the plugin, but if I do, I lose access to the Eloquent methods that let me load the user from the database (and I am sure some other things). It feels like this could work if the Auth0 user extended the eloquent user, or could be made to more easily. Thanks!

This isn't a deal breaker btw, more of an improvement. We currently have the app on Laravel 5.2 if that matters.

Thanks!

from laravel-auth0.

joshcanhelp avatar joshcanhelp commented on August 16, 2024 1

@vomitHatSteve - "necroing" is my favorite word of the month now, thank you for that 😆

Happy to re-open this. We're working on a major in the 7.0.0 branch (not a lot there currently) and I'm guessing the changes required to get this working how it should will include some breakage.

I'm happy to take a first pass at this once we've got our SDK major released and working in the 7.0.0 branch here but open to PRs and suggestions in the meantime!

from laravel-auth0.

joshcanhelp avatar joshcanhelp commented on August 16, 2024

Thanks for the note here @dustinleblanc ... we have a section on our quickstart that addresses Auth0 login along with a database:

https://auth0.com/docs/quickstart/webapp/laravel#extra-custom-user-handling

Is that helpful or are you looking to do something else?

from laravel-auth0.

joshcanhelp avatar joshcanhelp commented on August 16, 2024

What, exactly, are you trying to do that you're unable to? Would it be possible to extend the Eloquent model to extract that user data, using the Auth0 class as an example?

I'm definitely open to a different implementation here, as long as it doesn't mean we break everything!

from laravel-auth0.

joshcanhelp avatar joshcanhelp commented on August 16, 2024

No activity, closing.

from laravel-auth0.

vomitHatSteve avatar vomitHatSteve commented on August 16, 2024

I don't know if this ticket should be re-opened but two use-cases include issue #114 and integrating with bouncer (https://github.com/JosephSilber/bouncer)

Apologies if necroing this thread is incorrect etiquette.

from laravel-auth0.

joshcanhelp avatar joshcanhelp commented on August 16, 2024

@vomitHatSteve @saltukalakus - Would you be able to give the change-user-model branch a try and see if it works for you?

https://github.com/auth0/laravel-auth0/tree/change-user-model

from laravel-auth0.

vomitHatSteve avatar vomitHatSteve commented on August 16, 2024

This branch doesn't appear to introduce new issues for me, but I'm still stymied by #158 unfortunately.

from laravel-auth0.

rlewkowicz avatar rlewkowicz commented on August 16, 2024

I'm running into issues as well and I'm not skilled enough yet to fully understand it. I believe its that the user provider is not extending the native model? So I can't do something like:

Auth::guard(app('VoyagerGuard'))->getProvider()->getModel();

Its making it difficult to use some of these open source packages

from laravel-auth0.

joshcanhelp avatar joshcanhelp commented on August 16, 2024

@rlewkowicz - Does this branch solve your issue?

https://github.com/auth0/laravel-auth0/tree/change-user-model

Requires PHP 7.1, FYI.

from laravel-auth0.

joshcanhelp avatar joshcanhelp commented on August 16, 2024

We took a different approach here based on feedback. Please see the draft PR below to see what we're proposing:

#165

That new trait can be added to the Eloquent User model which can be returned from a custom User repository. If anyone has feedback on this, we'd appreciate it!

from laravel-auth0.

evansims avatar evansims commented on August 16, 2024

Closing this ticket as it's quite stale at this point, but the next major of this Laravel plugin will include a refactored user model that will address this, based on the work in the PR Josh linked above

from laravel-auth0.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.