Problem: authenticate users for access the application

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
xidea
Posts: 33
Joined: Thu Jun 30, 2016 7:04 pm

Problem: authenticate users for access the application

Postby xidea » Sat Aug 06, 2016 12:58 am

Hello,

I am stucking with a big problem in my app. I need to authenticate users in some way while hosting my app in an ASP MVC based website that wraps the application page. When a user logs in the website, the app must be aware of that and provide services for that user.

Is there a way to do this? I would not implement a custom authentication process directly in the app, for security reasons, I think there is a lot of limitation and complications that way. Using OAuth could be the way?

Thanks


Flavio

ThibTib
Posts: 16
Joined: Tue May 31, 2016 10:34 am

Re: Problem: authenticate users for access the application

Postby ThibTib » Tue Aug 09, 2016 11:55 pm

You could use a web service ?
--
ThibTib

JS-Support @Userware
Site Admin
Posts: 1093
Joined: Tue Apr 08, 2014 3:42 pm

Re: Problem: authenticate users for access the application

Postby JS-Support @Userware » Fri Aug 12, 2016 1:29 am

Support for ASP.NET authentication in CSHTML5 is coming within 8 weeks.

Thanks.
Regards,
JS-Support

xidea
Posts: 33
Joined: Thu Jun 30, 2016 7:04 pm

Re: Problem: authenticate users for access the application

Postby xidea » Fri Aug 12, 2016 9:11 am

Good news.

But, in the meantime, have you some hint about the inclusion of the app in a MVC app that manages the user authentication? For now, the app and the MVC website are two separate things, and there is perhaps a way to share js variables and functions by including the index.html in a MVC view by rendering his content using razor helpers.
By having the app page integrated in the rendered view, I could call js functions definded in the view via ExecuteJavascript, so I could share an authentication token that way. I need the app to be aware of what user is logged in the MVC site, so the app must know some way the User ID or some token representing the logged user in the server side WCF service context.
I think this is different from app-inside authenticating the user. It is precisely what I would not to do: the app is working inside the website context and must make use of it.

Sorry, my English is not so good to better explain the problem.

Now I think I can achieve this by writing a JS function in the MVC view markup (that includes the index.html markup) which returns info about the session, and call it from the app using ExecuteJavaScript. The app could then call the WCF service passing those info, and the WCF service could manage that info to retrieve user info and store his "logged in" state.

I've already tested the inclusion of the index.html in a ASP.NET MVC view with some success, not yet tried to put a js func in it and call from the app, but I think this is possible, as the view is rendered as an extended index.html, containing the function that I would call.

Thanks,

Flavio

xidea
Posts: 33
Joined: Thu Jun 30, 2016 7:04 pm

Re: Problem: authenticate users for access the application

Postby xidea » Thu Nov 10, 2016 10:04 am

Any news? :)


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 1 guest

 

 

cron