I created custom OAuth provider. Now I have problem with Office integration. When user want to edit document, Word asks for username and password. Is it possible to customize Word login page, because user can login only with sensenet account, but not with custom provider user?
-
Welcome to StackOverflow! Have you tried anything so far? StackOverflow isn't a free code-writing service, and expects you to try to solve your own problem first. Please update your question to show what you have already tried, showing the specific problem you are facing in a [minimal, complete, and verifiable example](http://stackoverflow.com/help/mcve). For further information, please see [how to ask good questions](http://stackoverflow.com/help/how-to-ask), and take the [tour of the site](http://stackoverflow.com/tour). – coagmano Apr 11 '18 at 08:34
1 Answers
The real issue is that Word (when opening a document through webdav) expects a username/password authentication, while sensenet doesn't store passwords in this case, because the OAuth provider feature relies on a 3rd party service (e.g. Google or Facebook) to authenticate users, that is its purpose.
IMHO it is not possible to customize the Word login process, although that would be the best for users: they should use the same GUI and authentication method than on the portal (e.g. press a Facebook button) - but currently that is not possible to my knowledge.
As a workaround you can say that those users who want to work with Office documents need to provide a password. Because users registered through an OAuth provider are really the same as regular users, there is no difference - except we do not save a password for them, because they log in through Google for example. But if you give a password to a user that registered through a provider, they should be able to log in from Word (and on the portal's built-in login page too) using their username and password. We did not try or test this scenario though, this is just a quick guess as of now.

- 1,490
- 13
- 19
-
Thank you for fast reply. I will try to implement your workaround. I have one more question. I had another issue with user created with custom provider. In my system username is email address. When user for first time try to login (and Sensenet try to create associate user) system responded with error that content Name can contain only characters that are valid in URL. Are there limitations concerning special characters? – Marko Matić Apr 11 '18 at 11:49
-
Please check this article for allowed characters in content names: https://community.sensenet.com/docs/content-naming/ (look for InvalidNameCharsPattern). It is possible that the '@' character is not allowed by default. – Miklós Tóth Apr 11 '18 at 18:38