๐Ÿš€
Growth log
  • About me
  • I LEARNED
    • General
      • ๊ฐœ๋ฐœ์ž ๊ฟ€ํŒ
      • ๊ทธ๋กœ์Šคํ•ดํ‚น ๊ธฐ์ดˆ
      • ๊ฐœ๋ฐœ์ž์—๊ฒŒ ๋„๋ฉ”์ธ ์ง€์‹์€ ์–ผ๋งˆ๋‚˜ ์ค‘์š”ํ• ๊นŒ?
      • DTO ๋…ผ์Ÿ์— ๋Œ€ํ•˜์—ฌ
      • MSA๋ž€?
    • Seminar
      • ํ…Œ์ŠคํŠธ ์ปค๋ฒ„๋ฆฌ์ง€ 100% - SLASH 21
      • TDD๊ฐ€ ์‹คํŒจํ•˜๋Š” ์ด์œ  - by ์ด๊ทœ์›๋‹˜
      • ๋Œ€๊ทœ๋ชจ ํŠธ๋ž˜ํ”ฝ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์„ฑ๋Šฅ ํŠœ๋‹ ๋…ธํ•˜์šฐ ๋‹ค ์•Œ๋ ค ๋“œ๋ฆผ|๋ผ์ธ๊ฐœ๋ฐœ์‹ค๋ก
      • ๊ฒฐ์ œ ์‹œ์Šคํ…œ์˜ SDK์™€ API ๋””์ž์ธ - SLASH 21
    • Web
      • SOP์™€ CORS
    • Spring & OOP
      • DTO vs VO
    • Ruby On Rails
      • Rails lib ๋””๋ ‰ํ† ๋ฆฌ์— ๋Œ€ํ•˜์—ฌ
      • Rails์˜ concerns๋ž€?
      • Rails์—์„œ์˜ GC ์ž‘๋™์›๋ฆฌ
      • Eager loading vs Lazy loading
      • Rails ํ™˜๊ฒฝ ๊ตฌ์„ฑ
      • ActionCable
      • ๐Ÿ“”Perfect ruby on rails
        • MVC ํŒจํ„ด์ธ Rails
        • Ruby on Rails ๊ธฐ๋ณธ - ์ปจํŠธ๋กค๋Ÿฌ
        • Ruby on Rails ๊ธฐ๋ณธ - ๋ทฐ
        • Ruby on Rails ๊ธฐ๋ณธ - ๋ชจ๋ธ
        • ์Šค์บํด๋”ฉ ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•œ Rails ๊ฐœ๋ฐœ ๊ธฐ์ดˆ
        • ๋ทฐ ๊ฐœ๋ฐœ
        • ๋ชจ๋ธ ๊ฐœ๋ฐœ
        • ๋ชจ๋ธ ๊ฐœ๋ฐœ - ๋‚™๊ด€์  ๋™์‹œ ์‹คํ–‰ ์ œ์–ด
        • ๋ชจ๋ธ ๊ฐœ๋ฐœ - ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ ๊ตฌํ˜„
        • ๋ชจ๋ธ ๊ฐœ๋ฐœ - Association
        • ๋ชจ๋ธ ๊ฐœ๋ฐœ - ์ฝœ๋ฐฑ
        • ๋ชจ๋ธ ๊ฐœ๋ฐœ - ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜
        • ๋ชจ๋ธ ๊ฐœ๋ฐœ - ๋ฐ์ดํ„ฐ ์ดˆ๊ธฐํ™”
        • ์ปจํŠธ๋กค๋Ÿฌ ๊ฐœ๋ฐœ - ์š”์ฒญ ์ •๋ณด ์ถ”์ถœ
        • ์ปจํŠธ๋กค๋Ÿฌ ๊ฐœ๋ฐœ - ์‘๋‹ต
        • ์ปจํŠธ๋กค๋Ÿฌ ๊ฐœ๋ฐœ - ์ƒํƒœ ๊ด€๋ฆฌ
        • ๋ผ์šฐํŒ… - RESTful
        • ๋ผ์šฐํŒ… - RESTful ์ธํ„ฐํŽ˜์ด์Šค์˜ ์‚ฌ์šฉ์ž ์ •์˜ํ™”
        • ๋ผ์šฐํŒ… - RESTful ํ•˜์ง€ ์•Š์€ ๋ผ์šฐํŠธ ์ •์˜
        • ํ…Œ์ŠคํŠธ
        • ํ…Œ์ŠคํŠธ - ์ค€๋น„
        • ํ…Œ์ŠคํŠธ - Unit ํ…Œ์ŠคํŠธ
        • ํ…Œ์ŠคํŠธ - Functional ํ…Œ์ŠคํŠธ
        • ํ…Œ์ŠคํŠธ - Integration ํ…Œ์ŠคํŠธ
        • ํด๋ผ์ด์–ธํŠธ ๊ฐœ๋ฐœ - Sprockets vs Webpacker
        • ํด๋ผ์ด์–ธํŠธ ๊ฐœ๋ฐœ - Sprockets
    • Node.js & Express
      • ๊ธฐ๋ณธ ๊ฐœ๋…
      • npx
    • Programing Language
      • Java
        • JavaDoc์— ๋Œ€ํ•ด
        • invocation์— ๋Œ€ํ•ด์„œ
        • ์–ด๋…ธํ…Œ์ด์…˜
        • ์ถ”์ƒํด๋ž˜์Šค & ์ธํ„ฐํŽ˜์ด์Šค
        • Package
        • ์˜ค๋ฒ„๋กœ๋”ฉ vs ์˜ค๋ฒ„๋ผ์ด๋”ฉ
      • Javascript
        • TCP School ํ›‘์–ด๋ณด๊ธฐ
          • ํƒ€์ž…
          • ํ˜• ๋ณ€ํ™˜
          • ๋ณ€์ˆ˜
          • ์—ฐ์‚ฐ์ž
          • ๋ฐ˜๋ณต๋ฌธ
          • ๋ฐฐ์—ด(array)
          • ํ•จ์ˆ˜
          • ํ•จ์ˆ˜ - ์Šค์ฝ”ํ”„์™€ ํ˜ธ์ด์ŠคํŒ…
          • ํ•จ์ˆ˜ - ๋งค๊ฐœ๋ณ€์ˆ˜์™€ ์ธ์ˆ˜
          • ํ•จ์ˆ˜ - ๋ฏธ๋ฆฌ ์ •์˜๋œ ์ „์—ญ ํ•จ์ˆ˜
          • ๊ฐ์ฒด
          • ํ”„๋กœํ† ํƒ€์ž…
          • DOM
          • BOM - Window ๊ฐ์ฒด
          • ์ด๋ฒคํŠธ(event)
      • Ruby
        • ๐Ÿ“”ํผํŽ™ํŠธ ๋ฃจ๋น„
    • DB
      • Redis
        • Redis ๊ฐœ์š”
      • Index(์ธ๋ฑ์Šค)?
      • DB Transaction & Lock
      • ๋™์‹œ์„ฑ ์ œ์–ด์— ๊ด€ํ•˜์—ฌ
      • Lock(์ž ๊ธˆ)์ด๋ž€?
      • ActiveRecord lock vs with_lock
      • Table lock vs Row lock
      • WHERE 1=1 ๊ตฌ๋ฌธ์— ๋Œ€ํ•˜์—ฌ
      • COUNT(*) vs COUNT(indexed column)
      • ๐Ÿ“•๊ด€๊ณ„ํ˜• ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์‹ค์ „์ž…๋ฌธ
      • ๐Ÿ“”SQL ์ฒซ๊ฑธ์Œ
      • ๐Ÿ“”๋ชจ๋‘์˜ SQL
    • Design Patterns
      • Observer pattern
      • Flyweight pattern
      • Singleton pattern
    • OOP
      • ๐Ÿ“”์˜ค๋ธŒ์ ํŠธ
        • 6์žฅ ๋ฉ”์‹œ์ง€์™€ ์ธํ„ฐํŽ˜์ด์Šค
      • ํด๋ž˜์Šค๊ฐ„ ๊ด€๊ณ„ ๊ฐ„๋‹จ ์ •๋ฆฌ
    • Regex
    • Collaboration
      • Git
      • Sourcetree
  • DAILY REVIEW
    • 2021
      • August
        • 2021-08-25(Wed)
        • 2021-08-23(Mon)
        • 2021-08-11(Wed)
        • 2021-08-04(Wed)
        • 2021-08-03(Tue)
        • 2021-08-02(Mon)
      • July
        • 2021-07-29(Thu)
        • 2021-07-26(Mon)
        • 2021-07-23(Fri)
        • 2021-07-22(Thu)
        • 2021-07-21(Wed)
        • 2021-07-20(Tue)
        • 2021-07-19(Mon)
        • 2021-07-15(Thu)
        • 2021-07-14(Wed)
        • 2021-07-13(Tue)
        • 2021-07-12(Mon)
      • June
        • 2021-06-05(Sat)
        • 2021-06-04(Fri)
        • 2021-06-03(Thu)
        • 2021-06-02(Wed)
        • 2021-06-01(Tue)
      • May
        • 2021-05-31(Mon)
        • 2021-05-29(Sat)
        • 2021-05-28(Fri)
        • 2021-05-27(Thu)
        • 2021-05-26(Wed)
        • 2021-05-25(Tue)
        • 2021-05-24(Mon)
        • 2021-05-22(Sat)
        • 2021-05-21(Fri)
        • 2021-05-20(Thu)
        • 2021-05-19(Wed)
        • 2021-05-18(Tue)
        • 2021-05-17(Mon)
        • 2021-05-15(Sat)
        • 2021-05-13(Thu)
        • 2021-05-12(Wed)
        • 2021-05-11(Tue)
        • 2021-05-10(Mon)
        • 2021-05-03(Mon)
      • April
        • 2021-04-30(Fri)
        • 2021-04-29(Thu)
        • 2021-04-28(Wed)
        • 2021-04-27(Tue)
        • 2021-04-26(Mon)
        • 2021-04-24(Sat)
        • 2021-04-23(Fri)
        • 2021-04-21(Wed)
        • 2021-04-20(Tue)
        • 2021-04-19(Mon)
        • 2021-04-18(Sun)
        • 2021-04-16(Fri)
        • 2021-04-15(Thu)
        • 2021-04-14(Wed)
        • 2021-04-12(Mon)
        • 2021-04-11(Sun)
        • 2021-04-09(Fri)
        • 2021-04-08(Thu)
        • 2021-04-06(Tue)
        • 2021-04-05(Mon)
        • 2021-04-04(Sun)
        • 2021-04-03(Sat)
        • 2021-04-02(Fri)
        • 2021-04-01(Thu)
      • March
        • 2021-03-29(Mon)
        • 2021-03-28(Sun)
        • 2021-03-26(Fri)
        • 2021-03-25(Thu)
        • 2021-03-24(Wed)
        • 2021-03-23(Tue)
        • 2021-03-22(Mon)
        • 2021-03-21(Sun)
        • 2021-03-20(Sat)
        • 2021-03-17(Wed)
        • 2021-03-16(Tue)
        • 2021-03-15(Mon)
        • 2021-03-12(Fri)
        • 2021-03-11(Thu)
        • 2021-03-10(Wed)
        • 2021-03-09(Tue)
        • 2021-03-08(Mon)
        • 2021-03-07(Sun)
        • 2021-03-05(Fri)
        • 2021-03-03(Wed)
        • 2021-03-02(Tue)
        • 2021-03-01(Mon)
      • Feb
        • 2021-02-26(Fri)
        • 2021-02-25(Thu)
        • 2021-02-24(Wed)
        • 2021-02-23(Tue)
        • 2021-02-22(Mon)
        • 2021-02-19(Fri)
        • 2021-02-18(Thu)
        • 2021-02-17(Wed)
        • 2021-02-16(Tue)
        • 2021-02-15(Mon)
        • 2021-02-14(Sun)
        • 2021-02-13(Sat)
        • 2021-02-12(Fri)
        • 2021-02-10(Wed)
        • 2021-02-09(Tue)
        • 2021-02-08(Mon)
        • 2021-02-07(Sun)
        • 2021-02-05(Fri)
        • 2021-02-03(Wed)
        • 2021-02-02(Tue)
        • 2021-02-01(Mon)
      • Jan
        • 2021-01-29(Fri)
        • 2021-01-28(Thu)
        • 2021-01-27(Wed)
        • 2021-01-26(Tue)
        • 2021-01-25(Mon)
        • 2021-01-23(Sat)
        • 2021-01-22(Fri)
        • 2021-01-20(Wed)
        • 2021-01-19(Tue)
        • 2021-01-18(Mon)
        • 2021-01-12(Tue)
        • 2020-01-11(Mon)
        • 2021-01-08(Fri)
        • 2021-01-07(Thu)
        • 2021-01-06(Wed)
        • 2021-01-05(Tue)
        • 2021-01-04(Mon)
        • 2021-01-01(Fri)
    • 2020
      • Dec
        • 2020-12-30(Thu)
        • 2020-12-25(Fri)
        • 2020-12-24(Thu)
        • 2020-12-23(Wed)
        • 2020-12-22(Tue)
        • 2020-12-21(Mon)
        • 2020-12-18 (Fri)
      • Nov
        • 2020-11-30(Mon)
        • 2020-11-28(Sat)
        • 2020-11-26(Thu)
        • 2020-11-25(Wed)
        • 2020-11-24(Tue)
        • 2020-11-23(Mon)
        • 2020-11-22(Sun)
        • 2020-11-20(Fri)
        • 2020-11-19(Thu)
        • 2020-11-18(Wed)
        • 2020-11-17(Tue)
        • 2020-11-14(Sat)
        • 2020-11-13(Fri)
        • 2020-11-12(Thu)
        • 2020-11-11(Wed)
        • 2020-11-09(Mon)
        • 2020-11-07(Sat)
        • 2020-11-05(Thu)
        • 2020-11-04(Wed)
        • 2020-11-03(Tue)
        • 2020-11-02(Mon)
    • Good article ์•„์นด์ด๋น™
Powered by GitBook
On this page
  • ์ƒ์„ธ ํ•™์Šต ๋‚ด์šฉ
  • ๋กœ๊ทธ์ธ
  • ํ•™์Šต ๋‚ด์šฉ์— ๋Œ€ํ•œ ๊ฐœ์ธ์ ์ธ ์ดํ‰
  • ๋‹ค์Œ ํ•™์Šต ๊ณ„ํš

Was this helpful?

  1. DAILY REVIEW
  2. 2021
  3. Feb

2021-02-01(Mon)

Previous2021-02-02(Tue)NextJan

Last updated 4 years ago

Was this helpful?

ํ•ญ๋ชฉ

๋‚ด์šฉ

ํ•™์Šต ๋‚ ์งœ

2021-02-01(์›”)

ํ•™์Šต ์‹œ๊ฐ„

11:00~24:00

ํ•™์Šต ๋ฒ”์œ„ ๋ฐ ์ฃผ์ œ

OAuth, devise, cookie

ํ•™์Šต ๋ชฉํ‘œ

๋กœ๊ทธ์ธ ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•˜์—ฌ ์ดํ›„ ๋ชจ๋“ˆ๊ธฐ๋Šฅ์—์„œ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•œ๋‹ค.

๋™๋ฃŒ ํ•™์Šต ๋ฐฉ๋ฒ•

eunhkim, yohlee, sanam, jujeong๋‹˜๊ณผ ํ•จ๊ป˜ ๋ผ์ด๋ธŒ์‰์–ด๋กœ ํŽ˜์–ด์ฝ”๋”ฉํ•จ

์ƒ์„ธ ํ•™์Šต ๋‚ด์šฉ

์šฐ์„  ์ฃผ๋ง๊ฐ„ ๋Œ€๋ถ€๋ถ„์˜ ๊ณตํ†ต๋ชจ๋“ˆ์„ ๋งŒ๋“ค์—ˆ๋‹ค๊ณ  ์ƒ๊ฐํ–ˆ์œผ๋‚˜ ๋กœ๊ทธ์ธ ๊ธฐ๋Šฅ๊นŒ์ง€ ๋”ํ•ด์ ธ์•ผ ๋น„๋กœ์†Œ ๊ธฐ๋Šฅ ๋ชจ๋“ˆ์„ ๋‚˜๋ˆ„์–ด ๊ฐœ๋ฐœํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ์ด๋ผ๋Š” ํŒ๋‹จ์ด ๋“ค์—ˆ๋‹ค. ๊ฐ ๋ชจ๋“ˆ์—์„œ ํ˜„์žฌ ํŽ˜์ด์ง€์— ์ ‘์†ํ•œ 'current_user'๊ฐ€ ๋ˆ„๊ตฌ์ธ์ง€ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์•ผ ๊ทธ์— ๋งž๋Š” ๋ทฐ๋ฅผ ๋ณด์—ฌ์ค„ ์ˆ˜ ์žˆ๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

์ด์— ํŒ€์›๋“ค๊ณผ ํŽ˜์–ด์ฝ”๋”ฉ์„ ํ†ตํ•ด ๋กœ๊ทธ์ธ ๊ธฐ๋Šฅ-์†Œ์…œ ๋กœ๊ทธ์ธ, 2์ฐจ์ธ์ฆ์„ ๊ตฌํ˜„ํ–ˆ๋‹ค.

๋กœ๊ทธ์ธ

์ด ๊ณผ์ •์—์„œ '๋กœ๊ทธ์ธ' ์ƒํƒœ ๊ด€๋ฆฌ์˜ 3๊ฐ€์ง€ ๋ฐฉ๋ฒ•์„ ํ•™์Šตํ•˜์˜€๋‹ค.

  1. ์ฟ ํ‚ค

  2. ์„ธ์…˜

  3. ํ† ํฐ

devise gem์„ ์“ฐ๋ฉด ์‰ฝ๊ฒŒ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ์œผ๋‚˜, ์„œ๋ธŒ์ ํŠธ ์š”๊ตฌ์‚ฌํ•ญ๋Œ€๋กœ SPA์Šค๋Ÿฝ๊ฒŒ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๋งŒ๋“ค์–ด์•ผํ•œ๋‹ค๋Š” ํŒ๋‹จํ•˜์— ์ง์ ‘ ๋กœ๊ทธ์ธ/๋กœ๊ทธ์•„์›ƒ ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•˜๊ธฐ๋กœ ํ•˜์˜€๋‹ค. devise gem์„ ์“ฐ๋ฉด ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ๋กœ๊ทธ์ธ/๋กœ๊ทธ์•„์›ƒ ์‹œ์— '์ƒˆ๋กœ๊ณ ์นจ'์„ ํ•˜๊ฒŒ ๋˜๋Š”๋ฐ, ์ด๋Š” SPA ์Šค๋Ÿฝ์ง€ ์•Š๋‹ค๋Š” ๊ฒƒ.

๊ฒฐ๊ณผ์ ์œผ๋กœ ๊ฐ ๋ฐฉ๋ฒ•์˜ ์žฅ๋‹จ์ ์„ ๊ณ ๋ คํ•˜์—ฌ 1์ฐจ ๋กœ๊ทธ์ธ์€ ์ฟ ํ‚ค๋กœ ๊ตฌํ˜„ํ•˜์˜€๋‹ค.

์†Œ์…œ ๋กœ๊ทธ์ธ

๊นƒํ—™ ์†Œ์…œ ๋กœ๊ทธ์ธ๋„ ๊ตฌํ˜„ํ–ˆ์—ˆ๋Š”๋ฐ ๊ตณ์ด ํ•„์š”๊ฐ€ ์—†๋‹ค๋Š” ํŒ๋‹จํ•˜์— ๋นผ๋ฒ„๋ ธ๋‹ค.

2์ฐจ ์ธ์ฆ

2์ฐจ ์ธ์ฆ(two factor authentication)์— ๋Œ€ํ•ด์„œ ์˜๊ฒฌ์ด ๋ถ„๋ถ„ํ–ˆ๋Š”๋ฐ, 2์ฐจ ์ธ์ฆ์ด ๋ฌด์—‡์ธ์ง€์— ๋Œ€ํ•ด์„œ ๋จผ์ € ์ •์˜ํ•ด๋ณด์•˜๋‹ค.

2์ฐจ ์ธ์ฆ์€ ๋‹จ์ˆœํžˆ 2๋ฒˆ ์ด์ƒ ์ธ์ฆํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ, ์ธ์ฆ์„ ํ•˜๊ธฐ ์œ„ํ•ด์„œ 2~3๊ฐ€์ง€ ์š”์†Œ๋ฅผ ์กฐํ•ฉํ•˜์—ฌ ์ธ์ฆ์„ ํ™•์ธํ•˜๋Š” ๊ฒƒ์„ ๋œปํ•œ๋‹ค. ์ด ๋•Œ ์ถ”๊ฐ€์ ์ธ ์š”์†Œ๋Š” ๋‚˜๋ฆ„๋Œ€๋กœ ํ‘œ์ค€ํ™”๋œ 3๊ฐ€์ง€ ์š”์†Œ๊ฐ€ ์กด์žฌํ•œ๋‹ค.

  1. Knowledge Factor(์‚ฌ์šฉ์ž๊ฐ€ ์•Œ๊ณ  ์žˆ๋Š” ๊ฒƒ)

    • ex) ๋น„๋ฐ€๋ฒˆํ˜ธ, PIN(Personal Identification Number), ํŒจํ„ด, ์–ด๋ฆด์  ๋ณ„๋ช… ๋“ฑ

  2. Possession Factor(์‚ฌ์šฉ์ž๊ฐ€ ์†Œ์œ ํ•˜๊ณ  ์žˆ๋Š” ๊ฒƒ)

    • ex) OTP tokn, ์Šค๋งˆํŠธ ์นด๋“œ, ์‹ ์šฉ์นด๋“œ, ์ฒดํฌ์นด๋“œ, ํœด๋Œ€ํฐ์œผ๋กœ SMS ๋ฌธ์ž ๋ฐ›๋Š” ๊ฒฝ์šฐ ๋“ฑ

  3. Inherence Factor(์‚ฌ์šฉ์ž ๊ณ ์œ ์˜ ๊ฒƒ)

    • ex) ์ง€๋ฌธ, ํ™์ฑ„์ธ์‹ ๋“ฑ

2~3๊ฐ€์ง€ ์š”์†Œ๋ฅผ ์กฐํ•ฉํ•ด์•ผํ•œ๋‹ค๋Š” ๊ฒƒ์ด ์ค‘์š”ํ•˜๋‹ค. ๋งŒ์•ฝ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ํ™•์ธํ•œ ๋‹ค์Œ ์–ด๋ฆด์  ๋ณ„๋ช…์„ ์ž…๋ ฅํ–ˆ์„ ๋•Œ ์ธ์ฆํ•ด์ค€๋‹ค๋ฉด 2์ฐจ ์ธ์ฆ์ผ๊นŒ? ์•„๋‹ˆ๋‹ค. ์ด๋Š” '๊ฐ•ํ•œ ์ธ์ฆ(Strong Authentication)'์— ์†ํ•œ๋‹ค๊ณ  ํ•  ์ˆ˜๋Š” ์žˆ๊ฒ ์ง€๋งŒ, Knowledge Factor๋งŒ์„ ์‚ฌ์šฉํ•˜์—ฌ ์ธ์ฆ์„ ์ง„ํ–‰ํ–ˆ์œผ๋ฏ€๋กœ 2์ฐจ ์ธ์ฆ์ด ์•„๋‹Œ ๊ฒƒ์ด๋‹ค.

์ด์— ์šฐ๋ฆฌ ํŒ€์€ rails์˜ ์•ก์…˜ ๋ฉ”์ผ๋Ÿฌ์™€ mailgun gem์„ ํ™œ์šฉํ•˜์—ฌ 2์ฐจ ์ธ์ฆ์„ ๊ตฌํ˜„ํ•˜์˜€๋‹ค. ์‚ฌ์‹ค mailgun gem ๋Œ€์‹  gmail ๊ณ„์ •์„ ์ƒ์„ฑํ•˜์—ฌ ๊ตฌํ˜„์„ ์‹œ๋„ํ•ด๋ณด์•˜์œผ๋‚˜, ๊ตฌ๊ธ€ ์ธก์—์„œ ๋น„์ •์ƒ์ ์ธ ๋ฉ”์ผ ํ™œ์šฉ์ด๋ผ๊ณ  ๊ฐ์ง€ํ•˜์˜€๋Š”์ง€ ๋ช‡๋ฒˆ ํ…Œ์ŠคํŠธํ•œ ๊ฒƒ๋งŒ์œผ๋กœ ์ด๋ฉ”์ผ ๊ณ„์ •์ด ๋น„ํ™œ์„ฑํ™”๋˜๋Š” ๋ถˆ์ƒ์‚ฌ๊ฐ€ ์žˆ์—ˆ๋‹ค;

  • ๋กœ๊ทธ์•„์›ƒ

    ๋กœ๊ทธ์•„์›ƒ์€ ์ฟ ํ‚ค๋ฅผ ์ดˆ๊ธฐํ™”ํ•˜๋Š” ์‹์œผ๋กœ ๊ตฌํ˜„๋˜์—ˆ๋‹ค. ์•„๋ž˜์ฒ˜๋Ÿผ 204 ์ƒํƒœ์ฝ”๋“œ๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋ คํ–ˆ์œผ๋‚˜ ์˜ค๋ฅ˜๊ฐ€ ๋‚˜์„œ ๋ฐฉ๋ฒ•์„ ์ฐพ์•„์•ผํ–ˆ๋Š”๋ฐ, render nothing => true, :status => 204 ๊ตฌ๋ฌธ์ฒ˜๋Ÿผ render๋ฅผ ์“ฐ๋Š” ๋ฐฉ์‹์€ rails 5 ๊นŒ์ง€๋งŒ ์œ ํšจํ–ˆ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ์•„๋ƒˆ๋‹ค.

      def destroy
        id = cookies.encrypted[:service_id]
        return if not User.exists?(id)
        User.find(id).logout
        remove_session
        render nothing => true, :status => 204
      end

    ๊ฒฐ๊ณผ์ ์œผ๋กœ rails6 ์ด์ƒ์—์„œ๋Š” ์ปจํŠธ๋กค๋Ÿฌ์—์„œ 204 ๋‚ด์šฉ์„ ๋ณด๋‚ด๋ ค๋ฉด ์•„๋ž˜์ฒ˜๋Ÿผ ๋ณด๋‚ด์•ผํ•œ๋‹ค.

    render body: nil, :status => 204

    ์•„๋‹ˆ๋ฉด

    head :no_content

    ์ด๋ ‡๊ฒŒ ๋ณด๋‚ด๋ฉด ๋œ๋‹ค.

ํ•™์Šต ๋‚ด์šฉ์— ๋Œ€ํ•œ ๊ฐœ์ธ์ ์ธ ์ดํ‰

์ƒํƒœ ๊ด€๋ฆฌ์— ๋Œ€ํ•ด์„œ ์ข€ ๋” ๊นŠ๊ฒŒ ํ•™์Šตํ•  ์ˆ˜ ์žˆ์–ด์„œ ์ข‹์•˜๋‹ค. ๋‹ค์Œ์—๋Š” ํ† ํฐ์„ ํ™œ์šฉํ•œ ๋ฐฉ์‹์„ ์‹œ๋„ํ•ด๋ด์•ผ๊ฒ ๋‹ค.

๋‹ค์Œ ํ•™์Šต ๊ณ„ํš

  • Appearance view ๊ตฌํ˜„

์†Œ์…œ ๋กœ๊ทธ์ธ์€ ์˜ OAuth ์ธ์ฆ์„ ์ฐธ๊ณ ํ•˜์—ฌ ๊ตฌํ˜„ํ•˜์˜€๋‹ค.

์ฐธ๊ณ 
42 api
์ฐธ๊ณ 
์ฐธ๊ณ