Skip to content

搞英语 → 看世界

翻译英文优质信息和名人推特

Menu
  • 首页
  • 作者列表
  • 独立博客
  • 专业媒体
  • 名人推特
  • 邮件列表
  • 关于本站
Menu

FoalTS 框架 – 版本 2.9 在这里?

Posted on 2022-05-30

版本 2.9-release-notes.png

Foal 2.9 版本已经发布!这是它带来的改进。

新的 OAuth2 Twitter 提供程序

在 LinkedIn、Google、Github 和 Facebook 之后,Foal 现在支持 Twitter 进行社交身份验证。

?文档链接

非常感谢@LeonardoSalvucci实现了这个功能。

 // 3p import { Context , dependency , Get } from ' @foal/core ' ; import { TwitterProvider } from ' @foal/social ' ; export class AuthController { @ dependency twitter : TwitterProvider ; @ Get ( ' /signin/twitter ' ) redirectToTwitter () { // Your "Login In with Twitter" button should point to this route. // The user will be redirected to Twitter auth page. return this . twitter . redirect (); } @ Get ( ' /signin/twitter/callback ' ) async handleTwitterRedirection ( ctx : Context ) { // Once the user gives their permission to log in with Twitter, the OAuth server // will redirect the user to this route. This route must match the redirect URI. const { userInfo , tokens } = await this . twitter . getUserInfo ( ctx ); // Do something with the user information AND/OR the access token. // If you only need the access token, you can call the "getTokens" method. // The method usually ends with a HttpResponseRedirect object as returned value. } }

OAuth2 提供者支持 PKCE 代码流

OAuth2 抽象提供程序现在支持 PKCE 代码流。如果您希望使用 PKCE 实现自己的提供程序,现在可以!

支持graphql 15 版和最新版type-graphql

Foal 的依赖项已更新,以支持最新版本的TypeGraphQL 。

原文发表: https ://foalts.org/blog/2022/05/29/version-2.9-release-notes

原文: https://dev.to/loicpoullain/foalts-framework-version-29-is-here-1j2i

本站文章系自动翻译,站长会周期检查,如果有不当内容,请点此留言,非常感谢。
  • Abhinav
  • Abigail Pain
  • Adam Fortuna
  • Alberto Gallego
  • Alex Wlchan
  • Answer.AI
  • Arne Bahlo
  • Ben Carlson
  • Ben Kuhn
  • Bert Hubert
  • Bits about Money
  • Brian Krebs
  • ByteByteGo
  • Chip Huyen
  • Chips and Cheese
  • Cool Infographics
  • Dan Sinker
  • David Walsh
  • Dmitry Dolzhenko
  • Elad Gil
  • Ellie Huxtable
  • Ethan Marcotte
  • Exponential View
  • FAIL Blog
  • Founder Weekly
  • Geoffrey Huntley
  • Geoffrey Litt
  • Greg Mankiw
  • Henrique Dias
  • Hypercritical
  • IEEE Spectrum
  • Investment Talk
  • Jaz
  • Jeff Geerling
  • Jonas Hietala
  • Josh Comeau
  • Lenny Rachitsky
  • Lou Plummer
  • Luke Wroblewski
  • Matt Stoller
  • Mert Bulan
  • Mostly metrics
  • News Letter
  • NextDraft
  • Non_Interactive
  • Not Boring
  • One Useful Thing
  • Phil Eaton
  • Product Market Fit
  • Readwise
  • ReedyBear
  • Robert Heaton
  • Ruben Schade
  • Sage Economics
  • Sam Altman
  • Sam Rose
  • selfh.st
  • Shtetl-Optimized
  • Simon schreibt
  • Slashdot
  • Small Good Things
  • Taylor Troesh
  • Telegram Blog
  • The Macro Compass
  • The Pomp Letter
  • thesephist
  • Thinking Deep & Wide
  • Tim Kellogg
  • 英文媒体
  • 英文推特
  • 英文独立博客
©2025 搞英语 → 看世界 | Design: Newspaperly WordPress Theme