J
J
justslipknot2021-07-29 12:47:09
OAuth
justslipknot, 2021-07-29 12:47:09

How to properly do oauth authorization in SPA + web api?

I have a client (spa, vue) and a web api (asp net core). Task: very roughly speaking, I'm making a twitter at the minimum with authorization through a third-party service (in my case, VK).

What is the main problem: let's say I logged in through VK, but I still need to store some data that has nothing to do with VK (text posts, like on Twitter).

That is, so that when logging in through VK, the user gets access to his account, on which all his "tweets" are stored, and so on. How can you do something like this? The difficulty is that all the examples that I found were described with asp.net mvc, but I need web api + spa

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2021-07-29
@rpsv

Duck, what's the problem? You have a SPA that shows the "Authorize via VK" button, which opens the VK page with a return address that leads to the back URL, and the SPA itself does not process authorization through VK in any way (if I remember correctly, you can use the VK JS library)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question