Python Flask Tutorial #6 - User Authentication > 파이썬

파이썬

그누 어디까지 써봤니? 나는 파이썬까지 써봤어!

Python Flask Tutorial #6 - User Authentication 정보

Python Flask Tutorial #6 - User Authentication

본문

https://youtu.be/CSHx6eCkmv0?list=PL-osiE80TeTs4UjLw5MM6OjgkjFeUxCYH

 

그누는 pbkdf2 https://pypi.org/project/pbkdf2/ 를 사용하죠..

 

여기는 bcrypt를 사용합니다. 

 

https://flask-bcrypt.readthedocs.io/en/latest/

 

```

pipenv install flask-bcrypt

```

 

bcrypt는 같은 패스워드라도 나오는 해시값이 매번 다르네요.

 

화면에 에러가 났을 때,  처음 실행시에 나오는 Debugger pin을  입력하면, 브라우저에서 바로 python z코드를 실행시겨 볼수가 있네요..  (13분근처)

 

세션을 관리해주는 모듈이 flask-login입니다.  login_user, current_user, logout_user

https://flask-login.readthedocs.io/en/latest/

```

pipenv install flask-login

```

 

http://localhost:5000/login?next=%2Faccount

와 같은 next parameter를 처리해줌. (44분경)

 

next_page = request.args.get('next')

 

새로운 if 문입니다.  파이썬에서 만 있나요?

 

return redirect(next_page) if next_page else redirect(url_for('home'))

 

 

 

 

추천
0

댓글 0개

전체 121 |RSS
파이썬 내용 검색

회원로그인

진행중 포인트경매

  1. 참여1 회 시작24.04.25 20:23 종료24.05.02 20:23
  2. 참여80 회 시작24.04.19 15:40 종료24.04.26 15:40
(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT