A
A
Artem00712018-09-03 22:45:24
User identification
Artem0071, 2018-09-03 22:45:24

How to connect Implict Flow and Cordova?

Using Laravel as a backend and Vue on the front
Making an ios app using cordova
How do I make it so that I can log in through the app?
Installed Laravel Passport, set up everything
Via the Web, I get a token in a hash and everything is fine
But I don’t understand how to make an entrance in the application itself, because redirect_url is needed there
I decided to see how it was done in VK (where else ....)
So, as I understand it, when they enter the application, their separate page is indicated:

In all other cases (mobile, desktop application), you must use the default redirect_uri: https://oauth.vk.com/blank.html

As I understand it (I'm not a mobile programmer, just a simple peepashnik), the moment when the user gets to this page is somehow caught.
I tried to do the same at home, but the problem is that when I tell the user to redirect from the application to the browser, it there is no way to return actually
That is, now the scheme is as follows:
1) The user enters the application
2) Presses the "log in" button
3) I transfer to the browser to the authorization page (I feel that something is already wrong here)
4) The user confirms the scope
5) The user redirects to redirect_uri (now it is localhost:8000/auth/blank.html) and in the address bar I have #access_token
I don’t understand how to proceed further .. Do I need to install something additionally or where to look at all ??
I’ll just clarify once again that this is not a native application, but with the help of Cordova (suddenly something depends on this ..)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Popov, 2018-09-03
@be_a_dancer

You don't know oAuth. It is recommended to use, for example, Implicit Grant or passport grant . Read the docs carefully.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question