I am creating a Webapp that uses OpenId to authenticate users, for example, Stackoverlfow. There will also be a mobile application, for example. Android or iPhone. These applications must be authenticated or logged in to access data and update user-owned material. Since there is no username and password that could be provided for authentication of a mobile device, I wonder how to achieve this.
It occurred to me two ways:
Create several keys on the server that must be entered on the device. This key will be sent as an authorization key when the mobile device sends or requests data, and the user can be connected in this way. When using this parameter, the key must somehow be transferred to the user, so he does not need to enter it. Perhaps by email, SMS or barcode scan.
The mobile application uses a browser or displays an integrated web panel that opens a special Webapp page. On this page, the user must log in and then allow the mobile application to read and write data.
My question is: are both ways possible and persist? Which one would you prefer? What are the details you need to pay attention to? Are there any other ways to do this? If I succeed, it would be impossible to use OpenId on the device and connect mobile and webapp in this way, right?
source share