stormpath / express-stormpath

Build simple, secure web applications with Stormpath and Express!
http://docs.stormpath.com/nodejs/express/
Apache License 2.0
325 stars 111 forks source link

Expand groups #574

Open iseltula opened 7 years ago

iseltula commented 7 years ago

Hi , Is there any way to expand Account inside the groups object?

robertjd commented 7 years ago

hi @iseltula , we only support one level of expansion, and our options for this library are focused on the first level from the account object. If you can tell me more about your use case, we may be able to help you with a solution. Thanks!

iseltula commented 7 years ago

Hi @robertjd , I am trying to get after authentication with stormpath-passportjs to retrieve all the account associated with the application.

robertjd commented 7 years ago

Our passport library is only focused on authentication (as that is all that passport does). If you want to work with more complex Stormpath cases, I would suggest using this library, express-stormpath.

This library exposes the current Stormpath application, as documented here:

https://docs.stormpath.com/nodejs/express/latest/configuration.html#stormpath-application

That gets a reference to the the Stormpath application instance, which has more methods that are provided by the underlying Stormpath Node SDK:

https://docs.stormpath.com/nodejs/jsdoc/Application.html

There is a getAccounts() method that should do what you need. Please let me know if this helps.

robertjd commented 7 years ago

Hi @iseltula , I wanted to check in to see if this solution works for you?