https://www.prisma.io/ logo
Join Slack
Powered by
# prisma-whats-new
  • m

    monkeybonkey

    11/17/2016, 4:54 PM
    I’m setting up a server side auth0 trigger that will automatically call a graph.cool service to insert a user when a user registers with auth0 - it’s their feature called “auth0 rules"
  • m

    monkeybonkey

    11/17/2016, 4:55 PM
    https://auth0.com/docs/rules
  • m

    monkeybonkey

    11/17/2016, 4:56 PM
    the auth0 rules context has data for a lot of things like the user data and the auth0 userid - but it doesn’t have a jwt userid token as far as i can see
  • m

    monkeybonkey

    11/17/2016, 4:57 PM
    this way I don’t have to rely on the client to create a user record on sign up and seems to be a cleaner way of keeping the auth0 user in sync with the graph.cool user
  • n

    nilan

    11/17/2016, 4:59 PM
    is there a way for you to generate a id token from within the rule?
  • m

    monkeybonkey

    11/17/2016, 5:00 PM
    no, unfortunately not
  • m

    monkeybonkey

    11/17/2016, 5:00 PM
    http://stackoverflow.com/questions/40657935/can-i-get-an-idtoken-from-an-auth0-rule/40658783#40658783
  • m

    monkeybonkey

    11/17/2016, 5:01 PM
    I suppose I can set up webtask to call the auth0 service to create a token then call graph.cool
  • m

    monkeybonkey

    11/17/2016, 5:01 PM
    so the rule would trigger a webtask would trigger graphcool, but that would be adding another step in the mix
  • n

    nilan

    11/17/2016, 5:02 PM
    yea this is currently propably your best bet. This issue is currently already on our list, but we have to look further into this to decide if we add specific support for this feature in the future
  • m

    monkeybonkey

    11/17/2016, 5:03 PM
    might make sense if it’s considered an auth0 integration out of the box
  • m

    monkeybonkey

    11/17/2016, 5:03 PM
    you can just publish the auth0 rule to the user and they would just copy and paste that in to their auth0 settings and the user sync would be done
  • m

    monkeybonkey

    11/17/2016, 5:05 PM
    Also, is there any indicator in the permanent tokens that could distinguish it as an “admin” token - or is it just the same “authenticated” role regardless?
  • n

    nilan

    11/17/2016, 5:05 PM
    a permanent auth token has admin access, not only authenticated access
  • n

    nilan

    11/17/2016, 5:06 PM
    basically an admin can do everything, even if there is no permission for that operation
  • n

    nilan

    11/17/2016, 5:06 PM
    an authenticated user still needs an appropriate
    AUTHENTICATED
    permission for the operation
  • m

    monkeybonkey

    11/17/2016, 5:07 PM
    then maybe just allow an admin to createUser with any fields ? that could be the simple fix
  • m

    monkeybonkey

    11/17/2016, 5:07 PM
    meh - maybe that’s a bad idea
  • n

    nilan

    11/17/2016, 5:09 PM
    again, if we decide to support this specific use case with Auth0, we will think in detail about the potential trade-offs. thanks so far for all your suggestions simple smile
  • m

    monkeybonkey

    11/17/2016, 5:09 PM
    I’ll add it to feature requests 🙂
    👍 1
  • f

    fred

    11/17/2016, 10:11 PM
    Hey guys 🙂
  • f

    fred

    11/17/2016, 10:11 PM
    Is there way to add multiple people to manage a project?
  • m

    monkeybonkey

    11/17/2016, 11:27 PM
    hey, how do you delete a user?
  • t

    tim2

    11/17/2016, 11:39 PM
    @fred: Good question, that is not possible yet! But I suggest you look into the issue that is targeting that feature and +1 it so we increase the priority of it :) ttps://github.com/graphcool/feature-requests/issues/19
  • t

    tim2

    11/17/2016, 11:39 PM
    Feel free to post any other feature requests in the feature-requests repo!
  • t

    tim2

    11/17/2016, 11:40 PM
    @monkeybonkey Did you already try out the deleteUser mutation?
  • t

    tim2

    11/17/2016, 11:40 PM
    It should also be possible in the console I think
  • f

    fred

    11/17/2016, 11:46 PM
    Thanks @tim2
  • f

    fred

    11/17/2016, 11:50 PM
    Hey @tim2, in that case, is there an easy way to transition data between accounts (I will have to create an org account)
  • e

    emilrmoeller

    11/18/2016, 1:27 AM
    So i would like to do this https://github.com/graphcool/console/issues/330 It’s kind of a show stopper for me atm, any ideas for workarounds? 🙂
1...484950...637Latest