<p>I believe what you're trying to accomplish can be done with a plugin.</p>

<p>Perhaps this OAuth plugin could at least offer some boilerplate for you: <a href="https://dukt.net/craft/oauth/" rel="nofollow">https://dukt.net/craft/oauth/</a></p>

<p>dukt's github also has some provider-specific plugins: <a href="https://github.com/dukt" rel="nofollow">https://github.com/dukt</a></p>

CC BY-SA 3.0
2016-08-31T19:53:29.873Z
2016-08-31T19:53:29.873Z
Greg
<p>I want to replace the login function with a custom one validating against Office 365 oAuth.  I already have the connection to MS coded, but I can't find a way to replace the core login function.  I can see the "before login" hook, but that would still display the login screen.  Is there any way to accomplish via plugin, or do I have to alter the core code to accomplish what I want?</p>

CC BY-SA 3.0
2016-10-06T18:22:20.477Z
Have you made some progress on this topic? I am also interest in using Office 365 logins for Craft.
Lars Bilke
CC BY-SA 3.0
2016-10-08T02:13:56.650Z
I did, but I had to modify a core file to make it work the way I wanted.  It was a small modification, but still probably not the best solution
Daniel Boggs
<plugin-development>
Replace core login function
# Replace core login function

(Asked by: username_0 on 2016-08-31)

I want to replace the login function with a custom one validating against Office 365 oAuth. I already have the connection to MS coded, but I can't find a way to replace the core login function. I can see the "before login" hook, but that would still display the login screen. Is there any way to accomplish via plugin, or do I have to alter the core code to accomplish what I want?

**Tags:** plugin-development
> **Comments:**
> **username_1**: Have you made some progress on this topic? I am also interest in using Office 365 logins for Craft.  
> **username_0**: I did, but I had to modify a core file to make it work the way I wanted.  It was a small modification, but still probably not the best solution  

---

## 1 answers

### Answer by username_2 on 2016-08-31. Score: 1

I believe what you're trying to accomplish can be done with a plugin.

Perhaps this OAuth plugin could at least offer some boilerplate for you: <https://dukt.net/craft/oauth/>

dukt's github also has some provider-specific plugins: <https://github.com/dukt>


---

