GithubHelp home page GithubHelp logo

happytrip's Introduction

HappyTrip

국내 여행 계획 서비스

기능

image

여행지 검색

image image

여행일정 관리

image image

Stack

Vue.js Spring Boot MyBatis MySQL

happytrip's People

Contributors

songahh avatar alexander930828 avatar gunsong2 avatar alleestar avatar

happytrip's Issues

[auth] 구글 소셜로그인 CORS 에러 관련

참고했던 책의 코드가 SSR이라서 내 프로젝트에 적용을 하면 CORS에러가 발생한다.

요래저래 피해갈 수는 없을까 싶었는데, 고민한 결과 방법이 없는 것 같아서 일단 기록으로 남겨두려고 한다.
분명히 해본 시도인데 기억력 이슈로 돌아서면 까먹고 안되는 걸 계속 반복하고 있어서다.. 😇

현재 지금 구조는 이렇다.
image

1. Vue 서버 → Spring 서버

  1. axios를 사용해서 요청을 보내기
  2. redirect 시키기

1번의 경우는 2번 과정에서 cors 에러가 발생한다.
2번의 경우는 로그인까지는 문제없지만, 결과로 페이지가 아닌 json 객체가 보이게 된다.

2번의 경우 SSR인 경우 페이지를 만들어서 보내기 때문에 문제가 없지만
나는 그게 아니기 때문에.. 다른 방법을 찾아야 한다.

2. 해결방안

01 Vue 서버 → Google 서버

image

제일 먼저 생각난 방법은 Vue 서버에서 Spring 서버를 거치지 않고
Google 서버로 요청을 바로 보내서 Token을 받는 방식이다.

그리고 토큰과 함께 백엔드 서버로 로그인 요청을 보내면 해결할 수 있을 것이다.
JEBAL 🥹🥹🥹🥹🥹🥹🥹🥹🥹😆🥹🥹🤢🥹
안되면 해결방안 02로 돌아와야지,,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.