Languages

Menu
Sites
Language
How to implement OAuth and OAuth2?

Hey,

I'm struggling with implementing OAuth mechanism in web app. I have seen a lot of topics about it but no one gives a definitely answer how to do it. Basically I tried two ways to achieve it.

1. Create hybrid app and use official tizen API.

Service app can't access UI elements like web view so we can't perform it in that way.

2. Implement on the client side using windows.

I read some posts that this solution works on emulator but it doesn't work on real device. Unfortunately I don't have a Tizen phone so I can't check it. Can somebody confirm that? I can also add that this way doesn't work on web simulator. Ripple doesn't show us a window.open(...) page

Does anybody implemented it? Do you have any ideas how can I do it? 

 

Old topics:

https://developer.tizen.org/forums/web-application-development/oauth-issues

https://developer.tizen.org/forums/web-application-development/implementing-oauth-mobile-app

 

 

Edited by: Nibisz on 07 Dec, 2016

Responses

3 Replies
Armaan-Ul- Islam

As you have to use OAuth Tizen API from Native application you may try using Application data exchange. I would suggest you to use Message Port. Tizen provides Message Port for data communication between apps. Please check the..

Message Port Web Guide

Message Port Web API Ref

Message Port Native Guide

Message Port Native API Ref

Check the Message port data Sending code from native app, and Message port data Receiving code from web app . They can communicate if you give the port a common name suppose "SAMPLE_PORT". Note that both apps should be signed with same author certificate. Then you may be able to pass authentification data.

Nibisz

I tried to do it in this way but to perform OAuth you need to open webview and native service app cannot create/open UI elements. Only UI Native applications can open UI elements and webview is one of the UI elements