express-stormpath icon indicating copy to clipboard operation
express-stormpath copied to clipboard

Expand groups

Open iseltula opened this issue 9 years ago • 4 comments

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

iseltula avatar Jan 09 '17 14:01 iseltula

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!

robertjd avatar Jan 09 '17 16:01 robertjd

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

iseltula avatar Jan 10 '17 14:01 iseltula

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 avatar Jan 10 '17 16:01 robertjd

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

robertjd avatar Jan 17 '17 16:01 robertjd