1

Version 2.9 release notes

 2 years ago
source link: https://foalts.org/blog/2022/05/29/version-2.9-release-notes/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Version 2.9 release notes

May 29, 2022 · 2 min read
Fullstack developer and creator of FoalTS
Banner

Version 2.9 of Foal has been released! Here are the improvements that it brings.

New OAuth2 Twitter Provider

After LinkedIn, Google, Github and Facebook, Foal now supports Twitter for social authentication.

👉 Link to the documentation

A big thanks to @LeonardoSalvucci for having implemented this feature.

// 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 Providers support PKCE Code Flow

OAuth2 abstract provider now supports PKCE code flow. If you wish to implement your own provider using PKCE, it's now possible!

Support for version 15 of graphql and latest version of type-graphql

Foal's dependencies have been updated so as to support the latest version of TypeGraphQL.

Share this article on
Stay up to date with the newsletter.
Tags:

Recommend

  • 11
    • docs.microsoft.com 3 years ago
    • Cache

    Visual Studio 2019 version 16.8 Release Notes

    Visual Studio 2019 version 16.8 Release Notes 12/08/2020

  • 2
    • foalts.org 3 years ago
    • Cache

    Version 2.3 release notes

    Version 2.3 release notesApril 22, 2021 · 3 min readLoïc PoullainFullstack developper and creator of FoalTS

  • 4
    • foalts.org 3 years ago
    • Cache

    Version 2.4 release notes

    Version 2.4 release notesMay 19, 2021 · 2 min readLoïc PoullainFullstack developper and creator of FoalTS

  • 2
    • foalts.org 3 years ago
    • Cache

    Version 2.5 release notes

    Version 2.5 release notesJune 11, 2021 · 1 min readLoïc PoullainFullstack developper and creator of FoalTS

  • 0
    • foalts.org 2 years ago
    • Cache

    Version 2.7 release notes

    Version 2.7 release notesDecember 12, 2021 · 2 min readLoïc PoullainFullstack developer and creator of FoalTS

  • 0
    • foalts.org 2 years ago
    • Cache

    Version 2.8 release notes

    Version 2.8 of Foal has been released! Here are the improvements that it brings.WebSocket support and socket.io...

  • 4

    Missing Semester Notes - Version Control (git)2020-05-22版本控制系统就是用来追踪文件或文件夹改变的工具。一方面可以用来维护文件修改的历史,另一方面它促进了多人协作。版本控制这么有用是为啥呢?就算你一个人工作,你也可以通过...

  • 5
    • foalts.org 2 years ago
    • Cache

    Version 2.10 release notes

    Version 2.10 release notesAugust 11, 2022 · One min readLoïc PoullainFullstack developer and creator of FoalT...

  • 1
    • foalts.org 1 year ago
    • Cache

    Version 2.11 release notes

    Version 2.11 release notesOctober 9, 2022 · One min readLoïc PoullainFullstack developer and creator of FoalT...

  • 3
    • foalts.org 1 year ago
    • Cache

    Version 3.1 release notes

    Version 3.1 release notesNovember 28, 2022 · One min readLoïc PoullainCreator of FoalTS. Software engineer.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK