Tychobra / polished

Authentication and Administration for Shiny apps
https://polished.tech
Other
233 stars 36 forks source link

added in error message for social auth #196

Closed muschellij2 closed 2 years ago

muschellij2 commented 2 years ago

Fixing #195 for having a custom error message.

merlinoa commented 2 years ago

If you are calling this function directly, why not just put a tryCatch() around this function and set your own error message in the catch()?

muschellij2 commented 2 years ago

I wasn't calling this directly, but when we had someone try to log in that was not in the authorized user list, the error came up at the top:

image

The only spot I found [polished] error checking user invite, was in this function, so I assumed it was coming from here, so wanted to see if it was possible to pass in a custom message for the error for our users.

merlinoa commented 2 years ago

I'll remove the "[polished]". That should not be in the error message. Is that a good enough compromise?

I would like to always throw consistent error messages from polished functions.

muschellij2 commented 2 years ago

I think that's fine, I was thinking "Error: Please check email for user invite" or something like that, just something more user friendly telling them what to do /who to ask