Skip to main content
Topic: External Authentication Addon WIP (Updates and Questions) (Read 13724 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: How do I add actions?

Reply #15

Next thing: have the user be able to associate and disassociate providers from the account settings page.

I'll leave registration stuff until last since I can then re-use the subs I create for associating.

Not had to touch any of the core Elkarte code yet :)
Last Edit: October 24, 2014, 11:39:58 am by ant59

Re: How do I add actions?

Reply #16

For anyone interested in how the Xydre theme handles the external logins


Re: External Authentication Addon WIP (Updates and Questions)

Reply #17

WOW! :D

 emanuele has a new hero. nods
Bugs creator.
Features destroyer.
Template killer.

Re: External Authentication Addon WIP (Updates and Questions)

Reply #18

That is awesome ant59.  Just for that, you should get a raise to ant60! ;)

Make this part of core when/if you can guys!
Success is not the result of spontaneous combustion, you must set yourself on fire!

Re: External Authentication Addon WIP (Updates and Questions)

Reply #19

ROFL @ IchBin :P
Bugs creator.
Features destroyer.
Template killer.

Re: External Authentication Addon WIP (Updates and Questions)

Reply #20

I'm having trouble loading the tempalte for the profile page. I'm getting this:

QuoteAn Error Has Occurred
Unable to load the 'action_profile' template.
Back

for this:

Code: [Select]
public function action_profile()
{
loadTemplate('Extauth');
}

I've added the link to the profile menu here:

Code: [Select]
'extauth' => array(
'label' => 'Connected Accounts',
'file' => 'Extauth.controller.php',
'controller' => 'Extauth_Controller',
'function' => 'action_profile',
'sc' => 'post',
'token' => 'profile-ea%u',
'password' => true,
'permission' => array(
'own' => array('profile_identity_any', 'profile_identity_own'),
'any' => array('profile_identity_any'),
),
),

Not sure what's going wrong. It's as if it's completely ignoring the loadTemplate call.

I have a "Extauth.template.php" file in themes/default/ with a template_main() function that just echoes 'Test'. But it won't show, and instead throws that error.
Last Edit: October 28, 2014, 09:10:18 am by ant59

Re: External Authentication Addon WIP (Updates and Questions)

Reply #21

template_main is "deprecated" in the sense that it's better not to rely on it and always name explicitly the template you want to use using the sub_template index:
Code: [Select]
$context['sub_template'] = 'my_template';
then, the menu template tries to be smart and sets a "default" sub_template to the name of the sub-action, in that case "action_profile", so in your template file you should have:
Code: [Select]
function template_action_profile ()
{

}

That should do the trick. ;)
Bugs creator.
Features destroyer.
Template killer.

Re: External Authentication Addon WIP (Updates and Questions)

Reply #22

Awesome! It works :D Thank you very much @emanuele. You're an encyclopedia of Elkarte :P

Re: External Authentication Addon WIP (Updates and Questions)

Reply #23

LOL

For sure I know the bugs I wrote. :P
Bugs creator.
Features destroyer.
Template killer.

Re: External Authentication Addon WIP (Updates and Questions)

Reply #24

A little more progress


Re: External Authentication Addon WIP (Updates and Questions)

Reply #25

Association and disassociation work perfectly on the fly :D

Re: External Authentication Addon WIP (Updates and Questions)

Reply #26

Wonderful, I'd love to see that as part of the ElkArte Core, so where's the pull request? ;)
Thorsten "TE" Eurich
------------------------

Re: External Authentication Addon WIP (Updates and Questions)

Reply #27

Haha! I'll release it as an addon first, but I'd have no objection to it being included in the core. I'd prefer it to be optional though, rather than forcibly included for people that don't want to use it as per my suggestion here: http://www.elkarte.net/community/index.php?topic=2155

Re: External Authentication Addon WIP (Updates and Questions)

Reply #28

Got a working registration template. I'll add the provider they're coming from at some point too.



EDIT: I might integrate the provider into the Register button, as with the login buttons (give it colour, icon, etc...).

Re: External Authentication Addon WIP (Updates and Questions)

Reply #29

I rolled with that idea and got this. Pretty happy with it. Now I've got to write the handling action for submitting the form and either registering them or telling them they screwed up (oh joy).



I'm wondering whether I should put it all into a single column though. The agreement requires javascript to scale it's height as-is and I can't think of a CSS-only solution.
Last Edit: October 29, 2014, 08:18:45 am by ant59